]> gitweb.michael.orlitzky.com - dead/lwn-epub.git/blobdiff - src/LWN/Page.hs
Add config file parsing.
[dead/lwn-epub.git] / src / LWN / Page.hs
index 0307214176a82c469f1f555a056b553c05bd3b06..7419402a3af304974dac87236826b4fcd8f545ae 100644 (file)
@@ -7,7 +7,6 @@ import qualified Data.Map as Map
 import Data.Time (getCurrentTime)
 import System.IO (Handle)
 import qualified Data.ByteString.Lazy as B (ByteString, hPut)
 import Data.Time (getCurrentTime)
 import System.IO (Handle)
 import qualified Data.ByteString.Lazy as B (ByteString, hPut)
-import Data.List (isInfixOf)
 import Data.String.Utils (split, strip)
 import Data.Maybe (catMaybes, fromJust, isNothing)
 import Data.Tree.NTree.TypeDefs (NTree)
 import Data.String.Utils (split, strip)
 import Data.Maybe (catMaybes, fromJust, isNothing)
 import Data.Tree.NTree.TypeDefs (NTree)
@@ -44,6 +43,7 @@ import Text.HandsomeSoup (css, parseHtml)
 import LWN.Article
 import LWN.HTTP (save_image)
 import LWN.URI (URL, try_make_absolute_url)
 import LWN.Article
 import LWN.HTTP (save_image)
 import LWN.URI (URL, try_make_absolute_url)
+import Misc (contains)
 import XHTML
 
 -- Map absolute image URLs to local system file paths where the image
 import XHTML
 
 -- Map absolute image URLs to local system file paths where the image
@@ -121,8 +121,6 @@ remove_comment_links  :: (ArrowXml a) => a XmlTree XmlTree
 remove_comment_links =
   processTopDown $ kill_comments `when` is_link
   where    
 remove_comment_links =
   processTopDown $ kill_comments `when` is_link
   where    
-    contains = isInfixOf
-
     is_comment_link =
       hasAttrValue "href" (contains "#Comments")
 
     is_comment_link =
       hasAttrValue "href" (contains "#Comments")