fast-tagsoup 1.0.12 → 1.0.13
raw patch · 3 files changed
+12/−4 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- LICENSE +1/−1
- Text/HTML/TagSoup/Fast.hs +9/−1
- fast-tagsoup.cabal +2/−2
LICENSE view
@@ -1,4 +1,4 @@-Copyright Vladimir Shabanov 2011-2012.+Copyright Vladimir Shabanov 2011-2017. All rights reserved. Redistribution and use in source and binary forms, with or without
Text/HTML/TagSoup/Fast.hs view
@@ -104,6 +104,10 @@ reverse a) -- fixTag (TagText t) = TagText (unescapeHtml t) fixTag t = t+ -- https://dev.w3.org/html5/spec-preview/tokenization.html#tokenizing-character-references+ -- TODO: more correct character reference tokenization+ -- there are additional rules for attributes too.+ -- The right way is here -- http://www.w3.org/TR/html5/tokenization.html -- https://dev.w3.org/html5/spec-preview/tokenization.html@@ -490,12 +494,16 @@ go acc (TagOpen "br" _ : TagClose "br" : ts) = go ("<br/>" : acc) ts go acc (TagOpen t as : ts) =- go (">" : renderAtts (reverse as) (t : "<" : acc)) ts+ (if t == "script" || t == "style" then goUnescaped else go)+ (">" : renderAtts (reverse as) (t : "<" : acc)) ts go acc (TagClose t : ts) = go (">" : t : "</" : acc) ts go acc (TagText t : ts) = go (escape t : acc) ts go acc (_ : ts) = go acc ts -- make compiler happy+ goUnescaped acc (TagText t : ts) =+ go (t : acc) ts+ goUnescaped acc ts = go acc ts renderAtts [] rs = rs renderAtts ((a,""):as) rs = a : " " : renderAtts as rs
fast-tagsoup.cabal view
@@ -1,7 +1,7 @@ cabal-version: >= 1.6 name: fast-tagsoup-version: 1.0.12-copyright: Vladimir Shabanov 2011-2016+version: 1.0.13+copyright: Vladimir Shabanov 2011-2017 author: Vladimir Shabanov <vshabanoff@gmail.com> maintainer: Vladimir Shabanov <vshabanoff@gmail.com> homepage: https://github.com/vshabanov/fast-tagsoup