From cfbf0f096bcdd9c9a5bfc2b394be863b39b34523 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 19 Sep 2022 10:30:29 -0700 Subject: Org reader: Allow org-ref v2 citations with `&` prefix. Closes #8302. --- src/Text/Pandoc/Readers/Org/Inlines.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/Text') diff --git a/src/Text/Pandoc/Readers/Org/Inlines.hs b/src/Text/Pandoc/Readers/Org/Inlines.hs index 8b2b83185..b1da970b8 100644 --- a/src/Text/Pandoc/Readers/Org/Inlines.hs +++ b/src/Text/Pandoc/Readers/Org/Inlines.hs @@ -380,8 +380,9 @@ orgRefCiteKey = endOfCitation = try $ do many $ satisfy isCiteKeySpecialChar satisfy $ not . isCiteKeyChar - in try $ satisfy isCiteKeyChar `many1TillChar` lookAhead endOfCitation - + in try $ do + optional (char '&') -- this is used in org-ref v3 + satisfy isCiteKeyChar `many1TillChar` lookAhead endOfCitation -- | Supported citation types. Only a small subset of org-ref types is -- supported for now. TODO: rewrite this, use LaTeX reader as template. -- cgit v1.2.3