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

Wiki links with anchor reference, MultiMarkdown style footnotes and fix for inline code mistaken for fence startMul #201

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

Conversation

vsch
Copy link
Contributor

@vsch vsch commented Oct 5, 2015

update test.

Not critical for most since no one complained about it. I only noticed it because I am testing the plugin.

@vsch
Copy link
Contributor Author

vsch commented Oct 27, 2015

Added fixes for #203 and #204

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")
Copy link
Contributor Author

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.

Copy link
Owner

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.

@vsch
Copy link
Contributor Author

vsch commented Oct 28, 2015

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.

@vsch vsch changed the title fix #200, wiki links with anchor reference Wiki links with anchor reference, PHP Extra footnotes and fix for inline code mistaken for fence start Oct 28, 2015
@vsch vsch changed the title Wiki links with anchor reference, PHP Extra footnotes and fix for inline code mistaken for fence start Wiki links with anchor reference, MultiMarkdown style footnotes and fix for inline code mistaken for fence startMul Oct 30, 2015
@vsch
Copy link
Contributor Author

vsch commented Oct 30, 2015

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.

@sirthias sirthias force-pushed the master branch 5 times, most recently from 5729862 to 19ca3d3 Compare December 14, 2016 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants