aboutsummaryrefslogtreecommitdiff
path: root/tp-bbcode/src/Thermoprint/Printout/BBCode/Inverse.hs
diff options
context:
space:
mode:
Diffstat (limited to 'tp-bbcode/src/Thermoprint/Printout/BBCode/Inverse.hs')
-rw-r--r--tp-bbcode/src/Thermoprint/Printout/BBCode/Inverse.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/tp-bbcode/src/Thermoprint/Printout/BBCode/Inverse.hs b/tp-bbcode/src/Thermoprint/Printout/BBCode/Inverse.hs
index 8e15417..e356d09 100644
--- a/tp-bbcode/src/Thermoprint/Printout/BBCode/Inverse.hs
+++ b/tp-bbcode/src/Thermoprint/Printout/BBCode/Inverse.hs
@@ -49,5 +49,11 @@ handleLine = flip handleLine' T.empty
49 | " " `T.isSuffixOf` p = "[hspace=" <> T.pack (show i) <> "/]" 49 | " " `T.isSuffixOf` p = "[hspace=" <> T.pack (show i) <> "/]"
50 | i <= 2 = T.pack $ genericReplicate i ' ' 50 | i <= 2 = T.pack $ genericReplicate i ' '
51 | otherwise = " [hspace=" <> T.pack (show $ i - 2) <> "/] " 51 | otherwise = " [hspace=" <> T.pack (show $ i - 2) <> "/] "
52 handleLine' (Markup ms l) _ = "[markup " <> foldMap markup ms <> "]" <> handleLine' l T.empty <> "[/markup]"
53 where
54 markup Bold = "bold=true"
55 markup Underline = "underline=true"
56 markup DoubleHeight = "doubleHeight=true"
57 markup DoubleWidth = "doubleWidth=true"
52 handleLine' (JuxtaPos ls) p = foldl (\p l -> p <> handleLine' l p) "" ls 58 handleLine' (JuxtaPos ls) p = foldl (\p l -> p <> handleLine' l p) "" ls
53 handleLine' (Line -> b) _ = LT.toStrict $ cotext b 59 handleLine' (Line -> b) _ = LT.toStrict $ cotext b