aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2020-10-10 16:28:52 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2020-10-10 16:28:52 -0700
commit0b5e2601f5700522e392400eee992938c086ef7a (patch)
tree1508ed2466946f095c7ad269595cdc0cb689e809 /src/Text/Pandoc/Readers
parent9ecf6a2d19741e5dc631ee280d291b29883f67f7 (diff)
downloadpandoc-0b5e2601f5700522e392400eee992938c086ef7a.tar.gz
LaTeX reader: allow blank lines inside `\author`.
Diffstat (limited to 'src/Text/Pandoc/Readers')
-rw-r--r--src/Text/Pandoc/Readers/LaTeX.hs9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs
index c42a21465..03dd701a9 100644
--- a/src/Text/Pandoc/Readers/LaTeX.hs
+++ b/src/Text/Pandoc/Readers/LaTeX.hs
@@ -538,7 +538,7 @@ inNote ils =
inlineCommand' :: PandocMonad m => LP m Inlines
inlineCommand' = try $ do
Tok _ (CtrlSeq name) cmd <- anyControlSeq
- guard $ name /= "begin" && name /= "end"
+ guard $ name /= "begin" && name /= "end" && name /= "and"
star <- option "" ("*" <$ symbol '*' <* sp)
overlay <- option "" overlaySpecification
let name' = name <> star <> overlay
@@ -1275,10 +1275,7 @@ addMeta field val = updateState $ \st ->
authors :: PandocMonad m => LP m ()
authors = try $ do
bgroup
- let oneAuthor = mconcat <$>
- many1 (notFollowedBy' (controlSeq "and") >>
- (inline <|> mempty <$ blockCommand))
- -- skip e.g. \vspace{10pt}
+ let oneAuthor = blocksToInlines' . B.toList . mconcat <$> many1 block
auths <- sepBy oneAuthor (controlSeq "and")
egroup
addMeta "author" (map trimInlines auths)
@@ -1468,7 +1465,7 @@ section (ident, classes, kvs) lvl = do
blockCommand :: PandocMonad m => LP m Blocks
blockCommand = try $ do
Tok _ (CtrlSeq name) txt <- anyControlSeq
- guard $ name /= "begin" && name /= "end"
+ guard $ name /= "begin" && name /= "end" && name /= "and"
star <- option "" ("*" <$ symbol '*' <* sp)
let name' = name <> star
let names = ordNub [name', name]