git.iko.soy/typeable/pandoc
on master help sign in
Improve LaTeX option parsing...
9a40976John MacFarlane
src/Text/Pandoc/Readers/LaTeX.hs+3−1
@@ -559,7 +559,9 @@ tok = try $ spaces >> grouped inline <|> inlineCommand' <|> singleChar'
559 return $ str t
559 return $ str t
560
560
561opt :: PandocMonad m => LP m Inlines
561opt :: PandocMonad m => LP m Inlines
562−opt = bracketed inline <|> (str <$> rawopt)
562+opt = bracketed inline
563+ <|>
564+ (str . T.dropWhile (=='[') . T.dropWhileEnd (==']') <$> rawopt)
563
565
564paropt :: PandocMonad m => LP m Inlines
566paropt :: PandocMonad m => LP m Inlines
565paropt = parenWrapped inline
567paropt = parenWrapped inline
test/command/6869.mdnew file+6
@@ -0,0 +1,6 @@
1+```
2+% pandoc -f latex -t native
3+\cite[„Aber“]{key}
4+^D
5+[Para [Cite [Citation {citationId = "key", citationPrefix = [], citationSuffix = [Str "\8222Aber\8220"], citationMode = NormalCitation, citationNoteNum = 0, citationHash = 0}] [RawInline (Format "latex") "\\cite[\8222Aber\8220]{key}"]]]
6+```