From 30bef24924491e905ac0bdf414f7e80a17f6911d Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Thu, 14 Sep 2023 15:21:12 -0700 Subject: [PATCH] Markdown reader: More accurate check that a normalCite... ...is not a link, bracketed span, or reference. See #9080. --- src/Text/Pandoc/Readers/Markdown.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs index d88c5d995ac9..d2aa408a1d1c 100644 --- a/src/Text/Pandoc/Readers/Markdown.hs +++ b/src/Text/Pandoc/Readers/Markdown.hs @@ -2256,7 +2256,10 @@ normalCite = try $ do citations <- citeList spnl char ']' - notFollowedBy (oneOf "{([") -- not a link or a bracketed span + -- not a link or a bracketed span + notFollowedBy (try (void source) <|> + (guardEnabled Ext_bracketed_spans *> void attributes) <|> + void reference) return citations suffix :: PandocMonad m => MarkdownParser m (F Inlines)