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:
Albert Krewinkel
2023-05-04 11:47:53 +02:00
parent 05a23af76d
commit f9bbbf6f40
2 changed files with 9 additions and 1 deletions
+1 -1
View File
@@ -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
+8
View File
@@ -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>
```