aboutsummaryrefslogtreecommitdiff
path: root/spec/src/Thermoprint/Printout/BBCode.hs
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2016-01-18 11:36:09 +0000
committerGregor Kleen <gkleen@yggdrasil.li>2016-01-18 11:36:09 +0000
commitf0ad3abb87d540c75a397a722ca5310d6d16cec9 (patch)
tree2a0459dc1d401ec7ed13372af7cce573760a5b3a /spec/src/Thermoprint/Printout/BBCode.hs
parentc605c0b51011f794256df1b7b3ddeb305bb91902 (diff)
downloadthermoprint-f0ad3abb87d540c75a397a722ca5310d6d16cec9.tar
thermoprint-f0ad3abb87d540c75a397a722ca5310d6d16cec9.tar.gz
thermoprint-f0ad3abb87d540c75a397a722ca5310d6d16cec9.tar.bz2
thermoprint-f0ad3abb87d540c75a397a722ca5310d6d16cec9.tar.xz
thermoprint-f0ad3abb87d540c75a397a722ca5310d6d16cec9.zip
Made attributes more lenient yet
Diffstat (limited to 'spec/src/Thermoprint/Printout/BBCode.hs')
-rw-r--r--spec/src/Thermoprint/Printout/BBCode.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/src/Thermoprint/Printout/BBCode.hs b/spec/src/Thermoprint/Printout/BBCode.hs
index 33101e5..8825732 100644
--- a/spec/src/Thermoprint/Printout/BBCode.hs
+++ b/spec/src/Thermoprint/Printout/BBCode.hs
@@ -119,9 +119,9 @@ parse :: Monoid a => Context a -> [DomTree] -> Either SemanticError a
119parse ctx = mergeResult ctx . map parseDom 119parse ctx = mergeResult ctx . map parseDom
120 120
121asBlock :: CI Text -> [DomTree] -> Map (CI Text) Text -> Either SemanticError Block 121asBlock :: CI Text -> [DomTree] -> Map (CI Text) Text -> Either SemanticError Block
122asBlock "VSpace" _ = Right . VSpace . lookupAttr "height" 1 122asBlock "VSpace" _ = Right . VSpace . lookupAttr "height" True 1
123asBlock t _ = const $ Left . UnmappedBlockElement . CI.original $ t 123asBlock t _ = const $ Left . UnmappedBlockElement . CI.original $ t
124 124
125asLine :: CI Text -> [DomTree] -> Map (CI Text) Text -> Either SemanticError Line 125asLine :: CI Text -> [DomTree] -> Map (CI Text) Text -> Either SemanticError Line
126asLine "HSpace" _ = Right . HSpace . lookupAttr "width" 1 126asLine "HSpace" _ = Right . HSpace . lookupAttr "width" True 1
127asLine t _ = const $ Left . UnmappedLineElement . CI.original $ t 127asLine t _ = const $ Left . UnmappedLineElement . CI.original $ t