aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2010-07-13 19:22:41 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2010-07-13 19:22:41 -0700
commit71b4700669162ea904a78c80d4f236d4ca13303f (patch)
tree5db073413c2484adf3efd57a7277eebd686565c1
parent0b23956d48682e93afc016a60d9c04696bb7a69a (diff)
downloadpandoc-71b4700669162ea904a78c80d4f236d4ca13303f.tar.gz
Made latex \section, \chapter parsers more forgiving of whitespace.
-rw-r--r--src/Text/Pandoc/Readers/LaTeX.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs
index 8d4f67edc..406809dfc 100644
--- a/src/Text/Pandoc/Readers/LaTeX.hs
+++ b/src/Text/Pandoc/Readers/LaTeX.hs
@@ -190,8 +190,11 @@ section = try $ do
headerWithLevel :: Int -> GenParser Char ParserState Block
headerWithLevel lev = try $ do
+ spaces
optional (char '*')
+ spaces
optional $ bracketedText '[' ']' -- alt title
+ spaces
char '{'
title' <- manyTill inline (char '}')
spaces