Markdown writer: Escape pipe characters when pipe_tables
enabled.
Closes #3887.
This commit is contained in:
parent
a90f131937
commit
5fc4980216
2 changed files with 2 additions and 1 deletions
|
@ -288,6 +288,7 @@ escapeString opts (c:cs) =
|
|||
| otherwise -> ">" ++ escapeString opts cs
|
||||
_ | c `elem` ['\\','`','*','_','[',']','#'] ->
|
||||
'\\':c:escapeString opts cs
|
||||
'|' | isEnabled Ext_pipe_tables opts -> '\\':'|':escapeString opts cs
|
||||
'^' | isEnabled Ext_superscript opts -> '\\':'^':escapeString opts cs
|
||||
'~' | isEnabled Ext_subscript opts -> '\\':'~':escapeString opts cs
|
||||
'$' | isEnabled Ext_tex_math_dollars opts -> '\\':'$':escapeString opts cs
|
||||
|
|
|
@ -46,6 +46,6 @@ Also escape things that might become line blocks or tables:
|
|||
% pandoc -t markdown
|
||||
\| hi \|
|
||||
^D
|
||||
\| hi |
|
||||
\| hi \|
|
||||
```
|
||||
|
||||
|
|
Loading…
Reference in a new issue