Closed josdejong closed 9 years ago
It looks like this is an issue with marked, the markdown parser this project uses internally. I'm actually planning on swapping marked out for markdown-it at some point, which is much better-maintained and should improve some of the weirder parsing quirks. However, it looks like it exhibits the same issue - I have to say I'm not completely familiar with the precedence rules in markdown but if both parsers treat it the same then it may be possible that that's the correct behaviour. I'll dig deeper and see what it's supposed to do.
Thanks!
FWIW this issue isn't fixed by the change to markdown-it.
Hm. Too bad. Is it a known issue at markdown-it
?
Without backticks it works with a single \
escape character:
# Operators
Operator | Description
-------- | -----------
`&` | Bitwise and
\| | Bitwise or
`^` | Bitwise xor
As a workaround I just write it as HTML:
# Operators
Operator | Description
-------- | -----------
`&` | Bitwise and
<code>|</code> | Bitwise or
`^` | Bitwise xor
For me this returns:
Yeah I've been trying to read around this and I can't quite figure out what the desired behaviour should be - best I can find is in GitHub's GFM description but that's annoyingly light on the detail of what kind of precedence order there should be.
It's kind of odd that both marked and markdown-it treat the |
as higher-precedence than the backticks but GitHub doesn't.
This is the corresponding issue in marked btw: https://github.com/chjj/marked/issues/285
Not sure if there's something over on markdown-it, if not I might open one
Righty my PR over on markdown-it is merged now so this should just be a matter of bumping markdown-it and it'll suddenly start working. I'll get that done sometime today
Nice, thanks!
Updated and it looks like it works, hurrah!
Thanks again! It's these little details that make or brake an app :)
Thanks for this great, simple editor.
I encountered a small bug: Try the following markdown code in the editor:
In this table, the line line with "bitwise or" is wrongly parsed as having three columns: The pipe character inside backticks
|
is not ignored but interpreted as a column separator.