diff options
| author | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2009-12-31 01:12:44 +0000 |
|---|---|---|
| committer | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2009-12-31 01:12:44 +0000 |
| commit | 3ec8772daff7d76097d7435c4e8da1df5ee4cc6a (patch) | |
| tree | 9fc8b0101a1bd0016b619707f45bad9c6a2b9132 /src/Text/Pandoc/Readers/HTML.hs | |
| parent | 1a166987dfc049d03f034b920e4ae679402aa2f5 (diff) | |
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/HTML.hs')
| -rw-r--r-- | src/Text/Pandoc/Readers/HTML.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Text/Pandoc/Readers/HTML.hs b/src/Text/Pandoc/Readers/HTML.hs index e6ca05d87..94cde2d8d 100644 --- a/src/Text/Pandoc/Readers/HTML.hs +++ b/src/Text/Pandoc/Readers/HTML.hs @@ -382,7 +382,7 @@ parseTitle = try $ do return contents -- parse header and return meta-information (for now, just title) -parseHead :: GenParser Char ParserState ([Inline], [a], [Char]) +parseHead :: GenParser Char ParserState Meta parseHead = try $ do htmlTag "head" spaces @@ -390,7 +390,7 @@ parseHead = try $ do contents <- option [] parseTitle skipMany nonTitleNonHead htmlEndTag "head" - return (contents, [], "") + return $ Meta contents [] [] skipHtmlTag :: String -> GenParser Char ParserState () skipHtmlTag tag = optional (htmlTag tag) @@ -409,7 +409,7 @@ parseHtml = do sepEndBy (choice [xmlDec, definition, htmlComment]) spaces skipHtmlTag "html" spaces - (title, authors, date) <- option ([], [], "") parseHead + meta <- option (Meta [] [] []) parseHead spaces skipHtmlTag "body" spaces @@ -420,7 +420,7 @@ parseHtml = do spaces optional (htmlEndTag "html" >> many anyChar) -- ignore anything after </html> eof - return $ Pandoc (Meta title authors date) blocks + return $ Pandoc meta blocks -- -- parsing blocks |
