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 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
remove_comment_links =
processTopDown $ kill_comments `when` is_link
where
- contains = isInfixOf
-
is_comment_link =
hasAttrValue "href" (contains "#Comments")