aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers/LaTeX.hs
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2009-12-31 01:12:44 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2009-12-31 01:12:44 +0000
commit3ec8772daff7d76097d7435c4e8da1df5ee4cc6a (patch)
tree9fc8b0101a1bd0016b619707f45bad9c6a2b9132 /src/Text/Pandoc/Readers/LaTeX.hs
parent1a166987dfc049d03f034b920e4ae679402aa2f5 (diff)
downloadpandoc-3ec8772daff7d76097d7435c4e8da1df5ee4cc6a.tar.gz
Changed Meta author and date types to Inline lists instead of Strings.
Meta [Inline] [[Inline]] [Inline] rather than Meta [Inline] [String] String. This is a breaking change for libraries that use pandoc and manipulate the metadata. Changed .native files in test suite for new Meta format. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1699 788f1e2b-df1e-0410-8736-df70ead52e1b
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
--