fast-tagsoup 1.0.4 → 1.0.5
raw patch · 2 files changed
+8/−4 lines, 2 files
Files
- Text/HTML/TagSoup/Fast.hs +7/−3
- fast-tagsoup.cabal +1/−1
Text/HTML/TagSoup/Fast.hs view
@@ -299,13 +299,17 @@ | r s /= ";" = entity (pp s) d (mm l) (mm n) (B.w2c (r s) : acc) c | otherwise = case lookupEntity $ reverse acc of- Nothing ->- poke d "&" >> go (s `plusPtr` (n-9)) (pp d) (l+9-n) c- Just i -> do+ Just [i] -> do+ -- there are strange two character entities, some of them+ -- are actually single character+ -- (𝔅 = '\x1D505', but returned as "\xD835\xDD05")+ -- ignore them. let put !d [] = go (pp s) d (mm l) True put !d (x:xs) = poke d x >> put (pp d) xs put d $ encodeChar i+ _ ->+ poke d "&" >> go (s `plusPtr` (n-9)) (pp d) (l+9-n) c encodeChar :: Char -> [Word8] encodeChar = map fromIntegral . go . ord
fast-tagsoup.cabal view
@@ -1,6 +1,6 @@ cabal-version: >= 1.6 name: fast-tagsoup-version: 1.0.4+version: 1.0.5 copyright: Vladimir Shabanov 2011-2012 author: Vladimir Shabanov <vshabanoff@gmail.com> maintainer: Vladimir Shabanov <vshabanoff@gmail.com>