git.iko.soy/typeable/pandoc
on master help sign in
LaTeX reader: be more forgiving in parsing command options.

This was needed, for example, to make some minted options work.

commit21328a87718818d78c658c87a2c42298453cc45f authorJohn MacFarlane <jgm@berkeley.edu> dateThu 19 Oct 2017, 15:58 (9 years ago) parentf615d7b
1 file changed+2−2
src/Text/Pandoc/Readers/LaTeX.hs+2−2
src/Text/Pandoc/Readers/LaTeX.hs+2−2
@@ -769,7 +769,7 @@ dolstinline = do
769769keyval :: PandocMonad m => LP m (String, String)
770770keyval = try $ do
771771 Tok _ Word key <- satisfyTok isWordTok
772− let isSpecSym (Tok _ Symbol t) = t `elem` [".",":","-","|","\\"]
772+ let isSpecSym (Tok _ Symbol t) = t /= "]" && t /= ","
773773 isSpecSym _ = False
774774 optional sp
775775 val <- option [] $ do
@@ -2095,7 +2095,7 @@ environments = M.fromList
20952095 , ("BVerbatim", fancyverbEnv "BVerbatim")
20962096 , ("lstlisting", do attr <- parseListingsOptions <$> option [] keyvals
20972097 codeBlockWith attr <$> verbEnv "lstlisting")
2098− , ("minted", minted)
2098+ , ("minted", minted)
20992099 , ("obeylines", obeylines)
21002100 , ("displaymath", mathEnvWith para Nothing "displaymath")
21012101 , ("equation", mathEnvWith para Nothing "equation")