diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2016-01-12 10:20:51 +0100 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2016-01-12 10:20:51 +0100 |
commit | 9f58557a76b5ae5478a7b7fc9e83266cd215c448 (patch) | |
tree | da17f533c9c5979265477ed3fc26c48c15a0ff0c /bbcode/src/Text/BBCode.hs | |
parent | 478bc6572d3ba508bddf1fdcf697e5a9e56e4055 (diff) | |
download | thermoprint-9f58557a76b5ae5478a7b7fc9e83266cd215c448.tar thermoprint-9f58557a76b5ae5478a7b7fc9e83266cd215c448.tar.gz thermoprint-9f58557a76b5ae5478a7b7fc9e83266cd215c448.tar.bz2 thermoprint-9f58557a76b5ae5478a7b7fc9e83266cd215c448.tar.xz thermoprint-9f58557a76b5ae5478a7b7fc9e83266cd215c448.zip |
Selfclosing tags
Diffstat (limited to 'bbcode/src/Text/BBCode.hs')
-rw-r--r-- | bbcode/src/Text/BBCode.hs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/bbcode/src/Text/BBCode.hs b/bbcode/src/Text/BBCode.hs index 30b1da8..32f74df 100644 --- a/bbcode/src/Text/BBCode.hs +++ b/bbcode/src/Text/BBCode.hs | |||
@@ -88,6 +88,7 @@ rose = fmap Z.toForest . flip rose' (Z.fromForest []) | |||
88 | 88 | ||
89 | rose'' (BBStr t) = return . Z.nextSpace . Z.insert (Node (BBPlain t) []) | 89 | rose'' (BBStr t) = return . Z.nextSpace . Z.insert (Node (BBPlain t) []) |
90 | rose'' (BBOpen t attrs) = return . Z.children . Z.insert (Node (BBTag t $ Map.fromList attrs) []) | 90 | rose'' (BBOpen t attrs) = return . Z.children . Z.insert (Node (BBTag t $ Map.fromList attrs) []) |
91 | rose'' (BBContained t attrs) = return . Z.nextSpace . Z.insert (Node (BBTag t $ Map.fromList attrs) []) | ||
91 | rose'' (BBClose t) = close t -- for more pointless | 92 | rose'' (BBClose t) = close t -- for more pointless |
92 | 93 | ||
93 | close :: Text -> TreePos Empty BBLabel -> Either TreeError (TreePos Empty BBLabel) | 94 | close :: Text -> TreePos Empty BBLabel -> Either TreeError (TreePos Empty BBLabel) |