summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2012-05-11 20:50:00 -0700
committerJohn MacFarlane <fiddlosopher@gmail.com>2012-05-11 20:50:00 -0700
commit206f261194e235186d6516f3628ba8150796ceb8 (patch)
tree8cdb1f247f608c380d7413ba86c63d920673ad0d /src
parentc844634757c49f635a0c0e1e226f9d5130559bfd (diff)
LaTeX reader: Allow skipping of unknown block commands in `\author` section.
Closes #505, which was a problem with `\vspace{10pt}` inside `\author`.
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Readers/LaTeX.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs
index c0b224aaf..36ff3fb96 100644
--- a/src/Text/Pandoc/Readers/LaTeX.hs
+++ b/src/Text/Pandoc/Readers/LaTeX.hs
@@ -298,7 +298,9 @@ authors :: LP ()
authors = try $ do
char '{'
let oneAuthor = mconcat <$>
- many1 (notFollowedBy' (controlSeq "and") >> inline)
+ many1 (notFollowedBy' (controlSeq "and") >>
+ (inline <|> mempty <$ blockCommand))
+ -- skip e.g. \vspace{10pt}
auths <- sepBy oneAuthor (controlSeq "and")
char '}'
updateState (\s -> s { stateAuthors = map (normalizeSpaces . toList) auths })