@@ -198,21 +198,22 @@ orgRefCite = try $ choice
198198normalOrgRefCite :: OrgParser (F [Citation])
199199normalOrgRefCite = try $ do
200200 mode <- orgRefCiteMode
201− sequence <$> sepBy1 (orgRefCiteList mode) (char ',')
202− where
203− -- | A list of org-ref style citation keys, parsed as citation of the given
204− -- citation mode.
205− orgRefCiteList :: CitationMode -> OrgParser (F Citation)
206− orgRefCiteList citeMode = try $ do
207− key <- orgRefCiteKey
208− returnF $ Citation
209− { citationId = key
210− , citationPrefix = mempty
211− , citationSuffix = mempty
212− , citationMode = citeMode
213− , citationNoteNum = 0
214− , citationHash = 0
215− }
201+ -- | org-ref style citation key, parsed into a citation of the given mode
202+ let orgRefCiteItem :: OrgParser (F Citation)
203+ orgRefCiteItem = try $ do
204+ key <- orgRefCiteKey
205+ returnF $ Citation
206+ { citationId = key
207+ , citationPrefix = mempty
208+ , citationSuffix = mempty
209+ , citationMode = mode
210+ , citationNoteNum = 0
211+ , citationHash = 0
212+ }
213+ firstCitation <- orgRefCiteItem
214+ moreCitations <- many (try $ char ',' *> orgRefCiteItem)
215+ return . sequence $ firstCitation : moreCitations
216+ where
216217
217218-- | Read an Berkeley-style Org-mode citation. Berkeley citation style was
218219-- develop and adjusted to Org-mode style by John MacFarlane and Richard