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.
This commit is contained in:
parent
5e00cf8086
commit
e574d50b1c
2 changed files with 17 additions and 0 deletions
|
@ -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
|
||||
|
|
14
test/command/3773.md
Normal file
14
test/command/3773.md
Normal file
|
@ -0,0 +1,14 @@
|
|||
```
|
||||
% pandoc -t markdown
|
||||
A. \#
|
||||
B. \+
|
||||
C. \*
|
||||
D. o
|
||||
E. o or \*
|
||||
^D
|
||||
A. \#
|
||||
B. \+
|
||||
C. \*
|
||||
D. o
|
||||
E. o or \*
|
||||
```
|
Loading…
Reference in a new issue