aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers/LaTeX.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text/Pandoc/Readers/LaTeX.hs')
-rw-r--r--src/Text/Pandoc/Readers/LaTeX.hs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs
index b4c01fe19..cd1312966 100644
--- a/src/Text/Pandoc/Readers/LaTeX.hs
+++ b/src/Text/Pandoc/Readers/LaTeX.hs
@@ -317,19 +317,19 @@ title = try $ do
authors :: GenParser Char ParserState Block
authors = try $ do
string "\\author{"
- authors' <- manyTill anyChar (char '}')
+ authors' <- sepBy (many1 (notFollowedBy (oneOf "};,") >> inline)) (oneOf ",;")
+ char '}'
spaces
- let authors'' = map removeLeadingTrailingSpace $ lines $
- substitute "\\\\" "\n" authors'
+ let authors'' = map normalizeSpaces authors'
updateState (\s -> s { stateAuthors = authors'' })
return Null
date :: GenParser Char ParserState Block
date = try $ do
string "\\date{"
- date' <- manyTill anyChar (char '}')
+ date' <- manyTill inline (char '}')
spaces
- updateState (\state -> state { stateDate = date' })
+ updateState (\state -> state { stateDate = normalizeSpaces date' })
return Null
--