diff options
author | John MacFarlane <jgm@berkeley.edu> | 2017-06-30 17:41:25 +0200 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2017-06-30 17:41:25 +0200 |
commit | e574d50b1cec1a8aea58db70a2c88ad10f1c4cb2 (patch) | |
tree | 4dcfca7aea45fdf30fff4d292b2c5bd649bf5a94 /src/Text/Pandoc | |
parent | 5e00cf8086e0960e81c31f7cd981ace646623f09 (diff) | |
download | pandoc-e574d50b1cec1a8aea58db70a2c88ad10f1c4cb2.tar.gz |
Markdown writer: Ensure that `+` and `-` are escaped properly...
so they don't cause spurious lists. Previously they were only
if succeeded by a space, not if they were at end of line.
Closes #3773.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r-- | src/Text/Pandoc/Writers/Markdown.hs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Writers/Markdown.hs b/src/Text/Pandoc/Writers/Markdown.hs index b951288bc..1e0d8bde2 100644 --- a/src/Text/Pandoc/Writers/Markdown.hs +++ b/src/Text/Pandoc/Writers/Markdown.hs @@ -416,6 +416,9 @@ blockToMarkdown' opts (Plain inlines) = do '+':s:_ | not isPlain && isSpace s -> "\\" <> contents '*':s:_ | not isPlain && isSpace s -> "\\" <> contents '-':s:_ | not isPlain && isSpace s -> "\\" <> contents + '+':[] | not isPlain -> "\\" <> contents + '*':[] | not isPlain -> "\\" <> contents + '-':[] | not isPlain -> "\\" <> contents '|':_ | (isEnabled Ext_line_blocks opts || isEnabled Ext_pipe_tables opts) && isEnabled Ext_all_symbols_escapable opts |