parse_lwn,
preprocess,
remove_byline,
+ remove_full_story_paragraphs,
remove_title,
to_xhtml,
to_xml,
where
import Text.HandsomeSoup (css)
-import Text.Regex.Posix ((=~))
import Text.XML.HXT.Core (
(>>>),
(/>),
isElem >>> hasName "a"
+remove_full_story_paragraphs :: (ArrowXml a) => a XmlTree XmlTree
+remove_full_story_paragraphs =
+ processTopDown $ none `when` full_story_paragraph
+
+
remove_comment_links :: (ArrowXml a) => a XmlTree XmlTree
remove_comment_links =
processTopDown $ kill_comments `when` is_link
hasName "a"
>>>
ifA
- (this /> hasText (=~ "Full Story"))
+ (this /> hasText (== "Full Story"))
this
none