LaTeX writer: clean up options parser.

Make sure that we require the closing bracket.
This commit is contained in:
Jesse Rosenthal 2016-02-18 23:35:38 -05:00
parent 4112b321cd
commit 4438ff17fb

View file

@ -1259,10 +1259,11 @@ deNote x = x
pDocumentOptions :: P.Parsec String () [String]
pDocumentOptions = do
P.char '['
P.sepBy
(P.many $
P.spaces *> P.noneOf (" ,]" :: String) <* P.spaces)
opts <- P.sepBy
(P.many $ P.spaces *> P.noneOf (" ,]" :: String) <* P.spaces)
(P.char ',')
P.char ']'
return opts
pDocumentClass :: P.Parsec String () String
pDocumentClass =