aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/Markdown
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2021-05-16 11:53:19 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2021-05-16 11:53:19 -0700
commit39a69c4f93d46e059c48a740b69dfff219a5d715 (patch)
treef1aa9ac4cd37657126d6712ad5054b46315f9805 /src/Text/Pandoc/Writers/Markdown
parent98a5a63b5228d3eaba55d9833f454f08b925b774 (diff)
downloadpandoc-39a69c4f93d46e059c48a740b69dfff219a5d715.tar.gz
Markdown writer: improve escaping of `@`.
We need to escape literal `@` before `{` because of the new citation syntax.
Diffstat (limited to 'src/Text/Pandoc/Writers/Markdown')
-rw-r--r--src/Text/Pandoc/Writers/Markdown/Inline.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/Markdown/Inline.hs b/src/Text/Pandoc/Writers/Markdown/Inline.hs
index 2062050e4..ced5fbacb 100644
--- a/src/Text/Pandoc/Writers/Markdown/Inline.hs
+++ b/src/Text/Pandoc/Writers/Markdown/Inline.hs
@@ -56,7 +56,7 @@ escapeText opts = T.pack . go . T.unpack
'@' | isEnabled Ext_citations opts ->
case cs of
(d:_)
- | isAlphaNum d || d == '_'
+ | isAlphaNum d || d == '_' || d == '{'
-> '\\':'@':go cs
_ -> '@':go cs
_ | c `elem` ['\\','`','*','_','[',']','#'] ->