: LT.Text        -- ^ The raw 'LT.Text' version of the cached wiki page.
              -> XML.Document   -- ^ The XML (HTML) version of the 'LT.Text'.
cleanAndParse = XML.parseText_ parseSettings . LT.pack . foldl1 (.) regexes . LT.unpack
  where
    parseSettings = XML.def { XML.psDecodeEntities = XML.decodeHtmlEntities }


-- =============================================================================
-- * Parse doc
-- =============================================================================


-- | Creates a HTML Table from the cache HTML (in XML format).
parseTable :: 
cleanAndParse :: LT.Text        -- ^ The raw 'LT.Text' version of the cached wiki page.
              -> XML.Document
cleanAndParse = XML.parseText_ parseSettings . LT.pack . foldl1 (.) regexes . LT.unpack
  where
    parseSettings = XML.def { XML.psDecodeEntities = XML.decodeHtmlEntities }


-- =============================================================================
-- * Parse doc
-- =============================================================================


-- | Creates a HTML Table from the cache HTML (in XML format).
cleanAndParse = XML.parseText_ parseSettings . LT.pack . foldl1 (.) regexes . LT.unpack
  where
    parseSettings = XML.def { XML.psDecodeEntities = XML.decodeHtmlEntities }


-- =============================================================================
-- * Parse doc
-- =============================================================================


-- | Creates a HTML Table from the cache HTML (in XML format).