Skip to content

Commit

Permalink
Markdown reader: More accurate check that a normalCite...
Browse files Browse the repository at this point in the history
...is not a link, bracketed span, or reference.

See #9080.
  • Loading branch information
jgm committed Sep 14, 2023
1 parent 3ff206c commit 30bef24
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Text/Pandoc/Readers/Markdown.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 30bef24

Please sign in to comment.