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. diff --git a/test/command/8302.md b/test/command/8302.md new file mode 100644 index 000000000..749530071 --- /dev/null +++ b/test/command/8302.md @@ -0,0 +1,6 @@ +``` +% pandoc -f org -t markdown +some text cite:&long-2004-tecton-evolut +^D +some text @long-2004-tecton-evolut +```