LaTeX reader: Fix regression in package options including underscore.
Closes #4424.
commitadefd86cd4c2273e9bf5fefe136c1aff1b13151a
authorJohn MacFarlane <jgm@berkeley.edu>
dateFri 2 Mar 2018, 09:33 (9 years ago)
parent991b577
src/Text/Pandoc/Readers/LaTeX.hs+1−1
@@ -1162,7 +1162,7 @@ singleChar = try $ do
11621162 else return $ Tok pos toktype t
11631163
11641164opt :: PandocMonad m => LP m Inlines
1165−opt = bracketed inline
1165+opt = bracketed inline <|> (str . T.unpack <$> rawopt)
11661166
11671167rawopt :: PandocMonad m => LP m Text
11681168rawopt = do
test/command/4424.mdnew file+10
@@ -0,0 +1,10 @@
1+```
2+% pandoc -f latex -t native
3+\documentclass{article}
4+\usepackage[sortlocale=en_GB]{biblatex}
5+\begin{document}
6+Test
7+\end{document}
8+^D
9+[Para [Str "Test"]]
10+```