diff options
| author | John MacFarlane <[email protected]> | 2022-09-19 10:30:29 -0700 |
|---|---|---|
| committer | John MacFarlane <[email protected]> | 2022-09-19 10:30:44 -0700 |
| commit | cfbf0f096bcdd9c9a5bfc2b394be863b39b34523 (patch) | |
| tree | b2c7c75cee6af5fa2f48e6626f97399fd3dc417f /src/Text | |
| parent | 7f1bb99a0323a0665612f9f2954b7287401731c0 (diff) | |
Org reader: Allow org-ref v2 citations with `&` prefix.
Closes #8302.
Diffstat (limited to 'src/Text')
| -rw-r--r-- | src/Text/Pandoc/Readers/Org/Inlines.hs | 5 |
1 files changed, 3 insertions, 2 deletions
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. |
