LaTeX reader: Allow skipping of unknown block commands in `\author` section.
Closes #505, which was a problem with `\vspace{10pt}` inside `\author`.
commit206f261194e235186d6516f3628ba8150796ceb8
authorJohn MacFarlane <fiddlosopher@gmail.com>
dateFri 11 May 2012, 20:50 (14 years ago)
parentc844634
src/Text/Pandoc/Readers/LaTeX.hs+3−1
@@ -298,7 +298,9 @@ authors :: LP ()
298298authors = try $ do
299299 char '{'
300300 let oneAuthor = mconcat <$>
301− many1 (notFollowedBy' (controlSeq "and") >> inline)
301+ many1 (notFollowedBy' (controlSeq "and") >>
302+ (inline <|> mempty <$ blockCommand))
303+ -- skip e.g. \vspace{10pt}
302304 auths <- sepBy oneAuthor (controlSeq "and")
303305 char '}'
304306 updateState (\s -> s { stateAuthors = map (normalizeSpaces . toList) auths })