diff options
| author | John MacFarlane <[email protected]> | 2023-09-14 15:21:12 -0700 |
|---|---|---|
| committer | John MacFarlane <[email protected]> | 2023-09-14 15:25:58 -0700 |
| commit | 30bef24924491e905ac0bdf414f7e80a17f6911d (patch) | |
| tree | 12b06adea02f99cb886542bf0090ff233a75482c | |
| parent | 3ff206cc4be8642e6c7f02c873707f8c5185321c (diff) | |
Markdown reader: More accurate check that a normalCite...
...is not a link, bracketed span, or reference.
See #9080.
| -rw-r--r-- | src/Text/Pandoc/Readers/Markdown.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs index d88c5d995..d2aa408a1 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) |
