aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Readers/Markdown.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs
index 122db17de..9f2bc4447 100644
--- a/src/Text/Pandoc/Readers/Markdown.hs
+++ b/src/Text/Pandoc/Readers/Markdown.hs
@@ -1823,6 +1823,11 @@ normalCite = try $ do
citeKey :: MarkdownParser (Bool, String)
citeKey = try $ do
+ -- make sure we're not right after an alphanumeric,
+ -- since foo@bar.baz is probably an email address
+ lastStrPos <- stateLastStrPos <$> getState
+ pos <- getPosition
+ guard $ lastStrPos /= Just pos
suppress_author <- option False (char '-' >> return True)
char '@'
first <- letter