packages feed

fast-tagsoup-utf8-only 1.0.4 → 1.0.5

raw patch · 2 files changed

+9/−5 lines, 2 files

Files

Text/HTML/TagSoup/Fast/Utf8Only.hs view
@@ -298,13 +298,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-utf8-only.cabal view
@@ -1,10 +1,10 @@ cabal-version:  >= 1.6 name:           fast-tagsoup-utf8-only-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>-homepage:       https://github.com/vshabanov/fast-tagsoup+homepage:       https://github.com/exbb2/fast-tagsoup license:        BSD3 category:       XML license-file:   LICENSE