aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <[email protected]>2021-04-15 12:34:28 -0700
committerJohn MacFarlane <[email protected]>2021-04-15 12:34:28 -0700
commit9bb168100a0ce69cf0f11a2c83f9218a2b5baf6d (patch)
tree91e2b937a81329e1456771cc97f39365a5fbd525
parent2d60524de43d59ffb1763a33a15cc2ecce613ecf (diff)
Markdown reader: fix regression with -@citekey.issue7219
This was previously parsed as an author-in-text suppress-author citation.
-rw-r--r--src/Text/Pandoc/Readers/Markdown.hs2
-rw-r--r--test/command/7219.md7
2 files changed, 8 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs
index 6c3947a81..5e5a1bc30 100644
--- a/src/Text/Pandoc/Readers/Markdown.hs
+++ b/src/Text/Pandoc/Readers/Markdown.hs
@@ -1500,7 +1500,7 @@ inline = do
'\145' -> smart
'\8220' -> smart
'\147' -> smart
- '-' -> smart
+ '-' -> smart <|> cite
'.' -> smart
'&' -> return . B.singleton <$> charRef
':' -> emoji
diff --git a/test/command/7219.md b/test/command/7219.md
new file mode 100644
index 000000000..d7bea48c3
--- /dev/null
+++ b/test/command/7219.md
@@ -0,0 +1,7 @@
+```
+% pandoc -t native
+-@Citekey
+^D
+[Para [Cite [Citation {citationId = "Citekey", citationPrefix = [], citationSuffix = [], citationMode = SuppressAuthor, citationNoteNum = 1, citationHash = 0}] [Str "@Citekey"]]]
+```
+