-
Notifications
You must be signed in to change notification settings - Fork 216
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
Wiki links with anchor reference, MultiMarkdown style footnotes and fix for inline code mistaken for fence startMul #201
base: master
Are you sure you want to change the base?
Conversation
def normalize(string: String) = string.replace("\r\n", "\n").replace("\r", "\n") | ||
// vsch: seems like there is a bug in Tidy, passing in HTML with <br>\n results in <br>\n\n, and passing one with <br>\n\n results in <br>\n | ||
// didn't look too deep into it but the following for now solves the problem. | ||
def normalize(string: String) = string.replace("\r\n", "\n").replace("\r", "\n").replace("<br>\n\n", "<br>\n") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could not get the tests to pass no matter how the expected text was defined. The actual always had \n\n after <br>
and expected did not. Found that for some reason Tidy has this peculiar effect and I did not feel like diving into Tidy() code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, tidy is not perfect.
Some of the tests certainly depend on some of it's quirks, so please feel free to adapt the test however you see fit.
PHP Markdown Extra style footnotes added. Opted out for PHP Markdown Extra not the MultiMarkdown ones. Did not see the need for long footnote names. Can be changed if someone desires alphanumeric footnote references instead of integers. I did not include this extension in the ALL extensions flags to avoid having to potentially rework existing tests. Anyone who wants this extension will need to add the flag to Extensions.ALL. Tests added for both with and without extension parsing of markdown with footnotes. I also bit the bullet and ran the IntelliJ reformat code command on the parser code so that it is uniformly formatted and without trailing blanks otherwise every commit to master I would have to go through the chunks and discard format only ones. |
Changed footnotes to be MultiMarkdown style. Footnote labels now allow alphanumeric, dash, dot, underscore. The rendered footnotes are sequential integers as before. Tests updated. This fixes #140. |
5729862
to
19ca3d3
Compare
update test.
Not critical for most since no one complained about it. I only noticed it because I am testing the plugin.