X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;ds=inline;f=src%2FLWN%2FArticlePage.hs;h=5964013f418303db52ce1ebe7dfdea123cdfe70c;hb=6103dbc5f8d3689e32001c3fd7627f3153e40bb0;hp=0e699a0978953ad61e9aaa7105c97025b11be3c2;hpb=b591d5f5c3c47d253c24144beae1edf8648cd94b;p=dead%2Flwn-epub.git diff --git a/src/LWN/ArticlePage.hs b/src/LWN/ArticlePage.hs index 0e699a0..5964013 100644 --- a/src/LWN/ArticlePage.hs +++ b/src/LWN/ArticlePage.hs @@ -29,16 +29,16 @@ instance XHTML ArticlePage where "" ++ "" ++ - "\n\n" ++ + "" ++ " " ++ - " " ++ (headline a) ++ "\n" ++ - "\n" ++ - "\n" ++ - "
\n\n" ++ + " " ++ (show $ LWN.Article.title a) ++ "" ++ + "" ++ + "" ++ + "
" ++ (to_xhtml a) ++ - "\n\n
\n" ++ - "\n\n" ++ + "
" ++ + "" ++ "" @@ -49,7 +49,7 @@ instance Epublishable ArticlePage where Just [x] -> return $ Just $ ArticlePage x _ -> return Nothing - title (ArticlePage x) = headline x + title (ArticlePage x) = show $ LWN.Article.title x -- | Takes data from an LWN page and determines whether or not it's a @@ -95,7 +95,7 @@ parse_articles xml = do parsed_headline <- parse_headline xml parsed_byline <- parse_byline xml parsed_body <- parse_body xml - let headline' = fromJust parsed_headline - let byline' = fromJust parsed_byline - let body' = fromJust parsed_body - return $ Just $ [Article headline' byline' body'] + let title' = Title (fromJust parsed_headline) + let byline' = Byline parsed_byline + let body' = BodyHtml (fromJust parsed_body) + return $ Just $ [Article title' byline' body']