Org reader: Allow org-ref v2 citations with & prefix.

Closes #8302.
This commit is contained in:
John MacFarlane
2022-09-19 10:30:29 -07:00
parent 7f1bb99a03
commit cfbf0f096b
2 changed files with 9 additions and 2 deletions
+3 -2
View File
@@ -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.
+6
View File
@@ -0,0 +1,6 @@
```
% pandoc -f org -t markdown
some text cite:&long-2004-tecton-evolut
^D
some text @long-2004-tecton-evolut
```