aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2017-10-19 15:58:12 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2017-10-19 15:58:29 -0700
commit21328a87718818d78c658c87a2c42298453cc45f (patch)
tree192ab22f7e1bc199e17a8062133495da343cb4c5
parentf615d7bb989bc06b17ae84b16b54c74c2fe83c19 (diff)
downloadpandoc-21328a87718818d78c658c87a2c42298453cc45f.tar.gz
LaTeX reader: be more forgiving in parsing command options.
This was needed, for example, to make some minted options work.
-rw-r--r--src/Text/Pandoc/Readers/LaTeX.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs
index 54c19b622..5ac114b19 100644
--- a/src/Text/Pandoc/Readers/LaTeX.hs
+++ b/src/Text/Pandoc/Readers/LaTeX.hs
@@ -769,7 +769,7 @@ dolstinline = do
keyval :: PandocMonad m => LP m (String, String)
keyval = try $ do
Tok _ Word key <- satisfyTok isWordTok
- let isSpecSym (Tok _ Symbol t) = t `elem` [".",":","-","|","\\"]
+ let isSpecSym (Tok _ Symbol t) = t /= "]" && t /= ","
isSpecSym _ = False
optional sp
val <- option [] $ do
@@ -2095,7 +2095,7 @@ environments = M.fromList
, ("BVerbatim", fancyverbEnv "BVerbatim")
, ("lstlisting", do attr <- parseListingsOptions <$> option [] keyvals
codeBlockWith attr <$> verbEnv "lstlisting")
- , ("minted", minted)
+ , ("minted", minted)
, ("obeylines", obeylines)
, ("displaymath", mathEnvWith para Nothing "displaymath")
, ("equation", mathEnvWith para Nothing "equation")