~alcinnz/haskell-stylist

e4ad50dfc65d66aeac5aad40f4dbed74c14bd603 — Adrian Cochrane 1 year, 9 months ago de0ec27
Inform callers who care that literal text is an inline element.
1 files changed, 2 insertions(+), 1 deletions(-)

M xml-conduit-stylist/src/Data/HTML2CSS.hs
M xml-conduit-stylist/src/Data/HTML2CSS.hs => xml-conduit-stylist/src/Data/HTML2CSS.hs +2 -1
@@ 63,7 63,8 @@ uriToString' uri = uriToString id uri ""

el2styletree el = StyleTree (Left el) $ mapMaybe node2styletree $ XML.elementNodes el
node2styletree (XML.NodeElement el) = Just $ el2styletree el
node2styletree (XML.NodeContent txt) = Just $ StyleTree (Right [("content", [String txt])]) []
node2styletree (XML.NodeContent txt) = Just $ StyleTree (Right [
    ("content", [String txt]), ("display", [Ident "inline"])]) []
node2styletree _ = Nothing

previous' (Just ElementNode {name = "", previous = prev'}) = previous' prev'