MacDownApp / macdown

Open source Markdown editor for macOS.
https://macdown.uranusjr.com/
9.43k stars 1.09k forks source link

Support escaping of table characters inside a table #623

Open Wandmalfarbe opened 8 years ago

Wandmalfarbe commented 8 years ago

A normal pipe table produces the desired table in MacDown.

test | a | table
--- | --- | --- 
one | two | three

A pipe table with an escaped pipe symbol in the header is not recognized as a table.

test | P(a\|b) | table
--- | --- | --- 
one | two | three

Please take a look at the Babelmark output for this example. Desired output is currently produced by:

pandoc 1.17.1
PHP Markdown Extra 1.2.8
Minima 0.8.0a3_20140907
kramdown 1.2.0
cebe/markdown GFM 1.1.0
cebe/markdown MarkdownExtra 1.1.0
Blackfriday
Earmark 0.2.1
AndrewFreemantle commented 7 years ago

Also affects the table layout when the pipe is in a code block too. Escaping doesn't affect the output..

test | a    | table
---- |----- | -----
one  | two  | `t | h | r | e | e`
four | five | six

renders as:

test a table
one two `t
four five six
Jmuccigr commented 7 years ago

Hoedown bug?

FranklinYu commented 7 years ago

Hoedown bug?

Yes, I think so. Currently, Hoedown with table (hoedown --tables) converts

test | P(a\|b) | table
--- | --- | --- 
one | two | three

into (unexpected)

<p>test | P(a|b) | table
--- | --- | --- 
one | two | three</p>

I have no idea how to render a table with develop branch; filed hoedown/hoedown#206 for this.