summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers/HTML.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text/Pandoc/Readers/HTML.hs')
-rw-r--r--src/Text/Pandoc/Readers/HTML.hs8
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