diff options
author | Jesse Rosenthal <jrosenthal@jhu.edu> | 2016-02-18 23:35:38 -0500 |
---|---|---|
committer | Jesse Rosenthal <jrosenthal@jhu.edu> | 2016-02-18 23:35:38 -0500 |
commit | 4438ff17fb2ce8a1d9991e5c530aaaf5547b7bc4 (patch) | |
tree | 3915b1d17752c1d787ebe02c2e9760f49b0ee16e /src/Text/Pandoc/Writers | |
parent | 4112b321cd70036e8325b352a640e176130c95a9 (diff) | |
download | pandoc-4438ff17fb2ce8a1d9991e5c530aaaf5547b7bc4.tar.gz |
LaTeX writer: clean up options parser.
Make sure that we require the closing bracket.
Diffstat (limited to 'src/Text/Pandoc/Writers')
-rw-r--r-- | src/Text/Pandoc/Writers/LaTeX.hs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs index 5ac166de2..4e4279ec5 100644 --- a/src/Text/Pandoc/Writers/LaTeX.hs +++ b/src/Text/Pandoc/Writers/LaTeX.hs @@ -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 = |