aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers
diff options
context:
space:
mode:
authorJesse Rosenthal <jrosenthal@jhu.edu>2016-02-18 23:35:38 -0500
committerJesse Rosenthal <jrosenthal@jhu.edu>2016-02-18 23:35:38 -0500
commit4438ff17fb2ce8a1d9991e5c530aaaf5547b7bc4 (patch)
tree3915b1d17752c1d787ebe02c2e9760f49b0ee16e /src/Text/Pandoc/Writers
parent4112b321cd70036e8325b352a640e176130c95a9 (diff)
downloadpandoc-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.hs7
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 =