@@ 67,7 67,8 @@ library
-- Networking
network-uri, async, hurl >= 2, filepath, temporary,
-- CSS
- stylist >= 2.4 && <3, stylist-traits, css-syntax, scientific, xml-conduit-stylist >= 3 && <3.1,
+ stylist >= 2.4 && <3, stylist-traits >= 0.1.1, css-syntax, scientific,
+ xml-conduit-stylist >= 3 && <3.1,
-- Voice2Json input
process, aeson >= 1.5 && <1.6, unordered-containers
@@ 23,6 23,7 @@ import Data.CSS.Preprocessor.Assets
import qualified Data.CSS.Preprocessor.PsuedoClasses as CSSPseudo
import qualified Data.CSS.Preprocessor.Text as CSSTxt
import Stylist (cssPriorityAgent, cssPriorityUser, attrTest, elementPath)
+import Stylist.Tree (treeFind)
import Data.HTML2CSS (el2stylist)
import Network.URI
@@ 146,18 147,6 @@ rhapsodePseudoFilter url hist tree =
CSSPseudo.addContains "target-within" (targetWithinSel tree $ uriFragment url) $
CSSPseudo.htmlPsuedoFilter Style.queryableStyleSheet
--- Apparantly I forgot to export this API...
-treeFind :: StyleTree p -> (p -> Bool) -> [p]
-treeFind p test = filter test $ treeFlattenAll p
-
--- And forgot to export this too...
-treeFlattenAll :: StyleTree p -> [p]
-treeFlattenAll = treeFlattenAll' . children
-treeFlattenAll' :: [StyleTree p] -> [p]
-treeFlattenAll' (StyleTree p []:ps) = p : treeFlattenAll' ps
-treeFlattenAll' (StyleTree p childs:sibs) = p : treeFlattenAll' childs ++ treeFlattenAll' sibs
-treeFlattenAll' [] = []
-
--------
---- Download assets
--------