![](https://seccdn.libravatar.org/avatar/e2145bc5cf53dda95c308a3c75e8fef3.jpg?s=120&d=mm&r=g)
Hello community, here is the log from the commit of package ghc-tagsoup for openSUSE:Factory checked in at 2016-01-21 23:43:16 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-tagsoup (Old) and /work/SRC/openSUSE:Factory/.ghc-tagsoup.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "ghc-tagsoup" Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-tagsoup/ghc-tagsoup.changes 2016-01-11 19:12:03.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.ghc-tagsoup.new/ghc-tagsoup.changes 2016-01-22 01:08:22.000000000 +0100 @@ -1,0 +2,6 @@ +Mon Jan 11 08:14:21 UTC 2016 - mimi.vx@gmail.com + +- update to 0.13.8 +* add parse/render functions directly to the Tree module + +------------------------------------------------------------------- Old: ---- tagsoup-0.13.7.tar.gz New: ---- tagsoup-0.13.8.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-tagsoup.spec ++++++ --- /var/tmp/diff_new_pack.pfgdUH/_old 2016-01-22 01:08:23.000000000 +0100 +++ /var/tmp/diff_new_pack.pfgdUH/_new 2016-01-22 01:08:23.000000000 +0100 @@ -19,7 +19,7 @@ %global pkg_name tagsoup Name: ghc-tagsoup -Version: 0.13.7 +Version: 0.13.8 Release: 0 Summary: Parsing and extracting information from (possibly malformed) HTML/XML documents License: BSD-3-Clause ++++++ tagsoup-0.13.7.tar.gz -> tagsoup-0.13.8.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tagsoup-0.13.7/CHANGES.txt new/tagsoup-0.13.8/CHANGES.txt --- old/tagsoup-0.13.7/CHANGES.txt 2016-01-09 22:21:31.000000000 +0100 +++ new/tagsoup-0.13.8/CHANGES.txt 2016-01-10 22:15:15.000000000 +0100 @@ -1,5 +1,7 @@ Changelog for TagSoup +0.13.8 + #30, add parse/render functions directly to the Tree module 0.13.7 #32, make sure upper case works in lookupEntity 0.13.6 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tagsoup-0.13.7/Text/HTML/TagSoup/Tree.hs new/tagsoup-0.13.8/Text/HTML/TagSoup/Tree.hs --- old/tagsoup-0.13.7/Text/HTML/TagSoup/Tree.hs 2016-01-09 22:21:31.000000000 +0100 +++ new/tagsoup-0.13.8/Text/HTML/TagSoup/Tree.hs 2016-01-10 22:15:15.000000000 +0100 @@ -7,10 +7,11 @@ module Text.HTML.TagSoup.Tree ( - TagTree(..), tagTree, - flattenTree, transformTree, universeTree + TagTree(..), tagTree, parseTree, parseTreeOptions, ParseOptions(..), + flattenTree, renderTree, renderTreeOptions, RenderOptions(..), transformTree, universeTree ) where +import Text.HTML.TagSoup (parseTags, parseTagsOptions, renderTags, renderTagsOptions, ParseOptions(..), RenderOptions(..)) import Text.HTML.TagSoup.Type import Control.Arrow @@ -49,6 +50,11 @@ where (a,b) = f xs f [] = ([], []) +parseTree :: StringLike str => str -> [TagTree str] +parseTree = tagTree . parseTags + +parseTreeOptions :: StringLike str => ParseOptions str -> str -> [TagTree str] +parseTreeOptions opts str = tagTree $ parseTagsOptions opts str flattenTree :: [TagTree str] -> [Tag str] flattenTree xs = concatMap f xs @@ -57,6 +63,11 @@ TagOpen name atts : flattenTree inner ++ [TagClose name] f (TagLeaf x) = [x] +renderTree :: StringLike str => [TagTree str] -> str +renderTree = renderTags . flattenTree + +renderTreeOptions :: StringLike str => RenderOptions str -> [TagTree str] -> str +renderTreeOptions opts trees = renderTagsOptions opts $ flattenTree trees -- | This operation is based on the Uniplate @universe@ function. Given a -- list of trees, it returns those trees, and all the children trees at diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tagsoup-0.13.7/tagsoup.cabal new/tagsoup-0.13.8/tagsoup.cabal --- old/tagsoup-0.13.7/tagsoup.cabal 2016-01-09 22:21:31.000000000 +0100 +++ new/tagsoup-0.13.8/tagsoup.cabal 2016-01-10 22:15:15.000000000 +0100 @@ -1,6 +1,6 @@ cabal-version: >= 1.6 name: tagsoup -version: 0.13.7 +version: 0.13.8 copyright: Neil Mitchell 2006-2016 author: Neil Mitchell <ndmitchell@gmail.com> maintainer: Neil Mitchell <ndmitchell@gmail.com>