Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More CommonMark compatibility, support for code fences and tests #13

Open
wants to merge 31 commits into
base: master
Choose a base branch
from

Commits on Jul 5, 2020

  1. Add test suite based on MDTest and testdoc

    Running `make test` will show the differences to the committed output,
    so that changes to smu's output become visible.
    karlb committed Jul 5, 2020
    Configuration menu
    Copy the full SHA
    832bb82 View commit details
    Browse the repository at this point in the history
  2. Refactor: remove ul variable

    karlb committed Jul 5, 2020
    Configuration menu
    Copy the full SHA
    923433e View commit details
    Browse the repository at this point in the history
  3. Rename documentation to README.md

    It shows up nicely n github and similar platforms this way.
    karlb committed Jul 5, 2020
    Configuration menu
    Copy the full SHA
    57da294 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    be1eb88 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    4f90ebf View commit details
    Browse the repository at this point in the history
  6. Rename README.md to README

    Otherwise github will render it as markdown which is
    a) not exactly the same rendering as smu
    b) not helpful for explaining the in/output in many cases
    karlb committed Jul 5, 2020
    Configuration menu
    Copy the full SHA
    a4f4226 View commit details
    Browse the repository at this point in the history
  7. Support empty lines in code fences

    Previously the paragraph detector included the code fences in the
    paragraph up to the first empty line. This worked for trivial cases, but
    broke an many real world cases.
    
    I introduce regexes to to this project in this PR. Hopefully, this does
    not bring any meaningful downsides I don't know about.
    karlb committed Jul 5, 2020
    Configuration menu
    Copy the full SHA
    f8100b0 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    6ecca24 View commit details
    Browse the repository at this point in the history
  9. Support backslashes in code spans and blocks

    See change in `testdoc.html`
    karlb committed Jul 5, 2020
    Configuration menu
    Copy the full SHA
    d1cc0bf View commit details
    Browse the repository at this point in the history
  10. Test code fence edge cases

    karlb committed Jul 5, 2020
    Configuration menu
    Copy the full SHA
    23f4307 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    f9060cf View commit details
    Browse the repository at this point in the history
  12. Update README

    Describe the differences to the original smu as suggested by @avih.
    karlb committed Jul 5, 2020
    Configuration menu
    Copy the full SHA
    54ab60f View commit details
    Browse the repository at this point in the history
  13. Add rendered version of README

    This provides a nice github pages website where users can read the
    rendered version of the README.
    karlb committed Jul 5, 2020
    Configuration menu
    Copy the full SHA
    2df9743 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    7c3f8ff View commit details
    Browse the repository at this point in the history
  15. Format more according to suckless style

    * Tabs for indentation, white-space for alignment
    * Space after if, while, etc.
    * Sort imports
    karlb committed Jul 5, 2020
    Configuration menu
    Copy the full SHA
    0e782a2 View commit details
    Browse the repository at this point in the history
  16. Test HTML passthrough and fix line break

    There was one line break too much in the output.
    karlb committed Jul 5, 2020
    Configuration menu
    Copy the full SHA
    7884019 View commit details
    Browse the repository at this point in the history
  17. Check for angular brackets later.

    This is a preparation step for allowing `\<` escapes.
    karlb committed Jul 5, 2020
    Configuration menu
    Copy the full SHA
    7c2739c View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    150c350 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    2d7fb93 View commit details
    Browse the repository at this point in the history
  20. README: fix indentation

    karlb committed Jul 5, 2020
    Configuration menu
    Copy the full SHA
    13eb055 View commit details
    Browse the repository at this point in the history
  21. Avoid potential segfault in surround

    Thanks valgrind!
    karlb committed Jul 5, 2020
    Configuration menu
    Copy the full SHA
    ee6af60 View commit details
    Browse the repository at this point in the history
  22. Reduce backslash quoting in hprint

    Code blocks should print all backslashes. For now, backslash escapes of
    backticks are still allowed, but those should be removed in a next step.
    karlb committed Jul 5, 2020
    Configuration menu
    Copy the full SHA
    9cc298f View commit details
    Browse the repository at this point in the history
  23. No backslash escaping in code blocks

    This is against commonmark:
    https://spec.commonmark.org/0.29/#example-303
    
    Doing it in hprint was also bad, since that function is used in other
    places where no escaping is intended, too.
    karlb committed Jul 5, 2020
    Configuration menu
    Copy the full SHA
    fddbdb2 View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    a109634 View commit details
    Browse the repository at this point in the history
  25. Add basic test case for smu -n

    karlb committed Jul 5, 2020
    Configuration menu
    Copy the full SHA
    62e6a10 View commit details
    Browse the repository at this point in the history
  26. Simplify process

    No need to call hprint here, all HTML substitution is already done in
    `doreplace`.
    karlb committed Jul 5, 2020
    Configuration menu
    Copy the full SHA
    6a11028 View commit details
    Browse the repository at this point in the history
  27. Refactor process

    karlb committed Jul 5, 2020
    Configuration menu
    Copy the full SHA
    8b6eab9 View commit details
    Browse the repository at this point in the history
  28. Add test for hard line breaks

    karlb committed Jul 5, 2020
    Configuration menu
    Copy the full SHA
    046e210 View commit details
    Browse the repository at this point in the history
  29. Remove special case for insert

    That can also be handled by a replace.
    karlb committed Jul 5, 2020
    Configuration menu
    Copy the full SHA
    92c7818 View commit details
    Browse the repository at this point in the history
  30. Configuration menu
    Copy the full SHA
    c1a245d View commit details
    Browse the repository at this point in the history
  31. Remove comparison to upstream smu

    I'd like this branch to be merged upstream, so comparing the differences
    won't make any sense in the README, anymore.
    karlb committed Jul 5, 2020
    Configuration menu
    Copy the full SHA
    ae85abb View commit details
    Browse the repository at this point in the history