mirror of
https://github.com/jgm/pandoc.git
synced 2026-08-28 17:20:47 +08:00
Markdown reader: disallow escaping of ~ and " in markdown_strict
This matches the behavior of the legacy `markdown.pl` as well as what is described in the manual. Fixes: #8777
This commit is contained in:
@@ -1556,7 +1556,7 @@ escapedChar' = try $ do
|
||||
(guardEnabled Ext_all_symbols_escapable >> satisfy (not . isAlphaNum))
|
||||
<|> (guardEnabled Ext_angle_brackets_escapable >>
|
||||
oneOf "\\`*_{}[]()>#+-.!~\"<>")
|
||||
<|> oneOf "\\`*_{}[]()>#+-.!~\""
|
||||
<|> oneOf "\\`*_{}[]()>#+-.!"
|
||||
|
||||
escapedNewline :: PandocMonad m => MarkdownParser m (F Inlines)
|
||||
escapedNewline = do
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
# Backslash escapes in markdown_strict
|
||||
|
||||
```
|
||||
% pandoc --from=markdown_strict -t html
|
||||
These are not escaped: \~ \"
|
||||
^D
|
||||
<p>These are not escaped: \~ \"</p>
|
||||
```
|
||||
Reference in New Issue
Block a user