diff options
author | John MacFarlane <jgm@berkeley.edu> | 2021-05-16 11:53:19 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2021-05-16 11:53:19 -0700 |
commit | 39a69c4f93d46e059c48a740b69dfff219a5d715 (patch) | |
tree | f1aa9ac4cd37657126d6712ad5054b46315f9805 /src | |
parent | 98a5a63b5228d3eaba55d9833f454f08b925b774 (diff) | |
download | pandoc-39a69c4f93d46e059c48a740b69dfff219a5d715.tar.gz |
Markdown writer: improve escaping of `@`.
We need to escape literal `@` before `{` because of
the new citation syntax.
Diffstat (limited to 'src')
-rw-r--r-- | src/Text/Pandoc/Writers/Markdown/Inline.hs | 2 |
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` ['\\','`','*','_','[',']','#'] -> |