Open
Conversation
The regex that populates "matches" gets confused when a markdown table pipe ("|") is directly followed by a markdown double bracket link tag ("[["). Inserting spaces around the pipe allows the regex to parse the markdown text properly.
ex: | column 1 | column 2 |[[link]]| // The link will work but it will be mistakenly rendered as part of column 2 in the HTML output.
Owner
|
Hi, I see your point but I think that the place where you put the I have to take a moment and see where else I could put it. The markdown library that Jingo uses, provides a nice set of hooks where I could probably attach and make the correct manipulation. I will leave this open, for now. Thanks a lot for the fix! |
Author
|
Definitely agree with you. I'm a bit of a rookie at node so I just made the simplest fix I could. I spent an hour looking at marked.js trying to figure out where I could fix it. In the end, I went with the cheap/easy workaround. Great job on Jingo though. Awesome wiki engine. I'm planning to use it for one of my projects. |
This file contains hidden or 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
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.
The regex that populates "matches" gets confused when a markdown table pipe ("|") is directly followed by a markdown double bracket link tag ("[["). Inserting spaces around the pipe allows the regex to parse the markdown text properly.
ex: | column 1 | column 2 |[[link]]| // The link will work but it will be mistakenly rendered as part of column 2 in the HTML output.
It would be more elegant to fix the regex, but I couldn't figure out the right expression. I used this work-around instead.