git.iko.soy/typeable/pandoc
on master help sign in
LaTeX reader: Fixed comments inside citations. Closes #4374.
3776404John MacFarlane
src/Text/Pandoc/Readers/LaTeX.hs+3−3
@@ -1074,12 +1074,12 @@ simpleCiteArgs = try $ do
1074
1074
1075citationLabel :: PandocMonad m => LP m String
1075citationLabel :: PandocMonad m => LP m String
1076citationLabel = do
1076citationLabel = do
1077− optional sp
1077+ optional spaces
1078 toksToString <$>
1078 toksToString <$>
1079 (many1 (satisfyTok isWordTok <|> symbolIn bibtexKeyChar)
1079 (many1 (satisfyTok isWordTok <|> symbolIn bibtexKeyChar)
1080− <* optional sp
1080+ <* optional spaces
1081 <* optional (symbol ',')
1081 <* optional (symbol ',')
1082− <* optional sp)
1082+ <* optional spaces)
1083 where bibtexKeyChar = ".:;?!`'()/*@_+=-[]" :: [Char]
1083 where bibtexKeyChar = ".:;?!`'()/*@_+=-[]" :: [Char]
1084
1084
1085cites :: PandocMonad m => CitationMode -> Bool -> LP m [Citation]
1085cites :: PandocMonad m => CitationMode -> Bool -> LP m [Citation]
test/command/4374.mdnew file+7
@@ -0,0 +1,7 @@
1+```
2+% pandoc -f latex -t native
3+\cite{a%
4+}
5+^D
6+[Para [Cite [Citation {citationId = "a", citationPrefix = [], citationSuffix = [], citationMode = NormalCitation, citationNoteNum = 0, citationHash = 0}] [RawInline (Format "latex") "\\cite{a%\n}"]]]
7+```