diff options
author | Gregor Kleen <pngwjpgh@users.noreply.github.com> | 2017-01-25 15:54:54 +0100 |
---|---|---|
committer | Gregor Kleen <pngwjpgh@users.noreply.github.com> | 2017-01-25 15:54:54 +0100 |
commit | 75d9fe614dca572aa1d7cfa53553e9c103eb2dd0 (patch) | |
tree | 54def052dcd8f288baead536a5f80d41a00387ef /tp-bbcode/src/Thermoprint | |
parent | 99fc4947543c1916e9fec952526a688eb7753490 (diff) | |
download | thermoprint-75d9fe614dca572aa1d7cfa53553e9c103eb2dd0.tar thermoprint-75d9fe614dca572aa1d7cfa53553e9c103eb2dd0.tar.gz thermoprint-75d9fe614dca572aa1d7cfa53553e9c103eb2dd0.tar.bz2 thermoprint-75d9fe614dca572aa1d7cfa53553e9c103eb2dd0.tar.xz thermoprint-75d9fe614dca572aa1d7cfa53553e9c103eb2dd0.zip |
Cleanup test suite
Diffstat (limited to 'tp-bbcode/src/Thermoprint')
-rw-r--r-- | tp-bbcode/src/Thermoprint/Printout/BBCode/Inverse.hs | 6 |
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 |