]> gitweb.michael.orlitzky.com - dead/lwn-epub.git/commitdiff
If we don't have the contents of a particular full story, drop its paragraph.
authorMichael Orlitzky <michael@orlitzky.com>
Sat, 14 Jul 2012 02:46:01 +0000 (22:46 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Sat, 14 Jul 2012 02:46:01 +0000 (22:46 -0400)
src/LWN/Page.hs

index ccc2590d64b0dddf94dcf85a62a650168549763d..30c54b550a530777eb9ccfd818b16785c46cc0ef 100644 (file)
@@ -34,6 +34,7 @@ import Text.XML.HXT.Core (
   getChildren,
   getText,
   hasName,
+  none,
   processAttrl,
   processTopDown,
   this,
@@ -128,8 +129,8 @@ insert_full_stories story_map =
     lookup_func :: (ArrowXml a) => URL -> a XmlTree XmlTree
     lookup_func href =
       case Map.lookup href story_map of
-        -- Leave it alone if we don't have the full story.
-        Nothing -> this
+        -- Drop the paragraph if we don't have the contents.
+        Nothing -> none
         Just v -> to_xml v
 
     article_xml :: (ArrowXml a) => a XmlTree XmlTree