Fix: support self-closing tags in trees, forests.
commit9fe35de6980cca4abecc25e790111cac7bc96e37
authorMatthias Fischmann <mf@zerobuzz.net>
dateFri 6 Jan 2017, 01:30 (10 years ago)
parent6abc0b4
Text/HTML/Tree.hs+1
@@ -26,6 +26,7 @@ tokensToForest = f (PStack [] [])
2626 TagOpen n _ -> if n `elem` nonClosing
2727 then f (pushFlatSibling t pstack) ts
2828 else f (pushParent t pstack) ts
29+ TagSelfClose {} -> f (pushFlatSibling t pstack) ts
2930 TagClose n -> (`f` ts) =<< popParent n pstack
3031 ContentChar _ -> f (pushFlatSibling t pstack) ts
3132 ContentText _ -> f (pushFlatSibling t pstack) ts