-
Notifications
You must be signed in to change notification settings - Fork 30
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
karlb
wants to merge
31
commits into
Gottox:master
Choose a base branch
from
karlb:rebase-on-upstream
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Running `make test` will show the differences to the committed output, so that changes to smu's output become visible.
It shows up nicely n github and similar platforms this way.
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
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.
See change in `testdoc.html`
Describe the differences to the original smu as suggested by @avih.
This provides a nice github pages website where users can read the rendered version of the README.
* Tabs for indentation, white-space for alignment * Space after if, while, etc. * Sort imports
There was one line break too much in the output.
This is a preparation step for allowing `\<` escapes.
Thanks valgrind!
Code blocks should print all backslashes. For now, backslash escapes of backticks are still allowed, but those should be removed in a next step.
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.
No need to call hprint here, all HTML substitution is already done in `doreplace`.
That can also be handled by a replace.
I'd like this branch to be merged upstream, so comparing the differences won't make any sense in the README, anymore.
I just started to write code fence support, so thank you a lot for this ! It will be useful for long code blocks. |
Please, could you merge it? Maybe, it would be better, if you provide your changes as several PRs. |
Could you please review and consider this merge request? CommonMark support in smu will be great. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
These are all changes in my smu fork. After the recent merge, the changes are mostly:
If you don't want to merge some parts or need smaller PRs to merge, let me know.