Markdown writer: Escape pipe characters when pipe_tables enabled.

Closes #3887.
This commit is contained in:
John MacFarlane 2017-09-07 22:10:13 -07:00
parent a90f131937
commit 5fc4980216
2 changed files with 2 additions and 1 deletions

View file

@ -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

View file

@ -46,6 +46,6 @@ Also escape things that might become line blocks or tables:
% pandoc -t markdown
\| hi \|
^D
\| hi |
\| hi \|
```