From 75d9fe614dca572aa1d7cfa53553e9c103eb2dd0 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Wed, 25 Jan 2017 15:54:54 +0100 Subject: Cleanup test suite --- tp-bbcode/src/Thermoprint/Printout/BBCode/Inverse.hs | 6 ++++++ tp-bbcode/thermoprint-bbcode.cabal | 2 +- tp-bbcode/thermoprint-bbcode.nix | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) (limited to 'tp-bbcode') 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 | " " `T.isSuffixOf` p = "[hspace=" <> T.pack (show i) <> "/]" | i <= 2 = T.pack $ genericReplicate i ' ' | otherwise = " [hspace=" <> T.pack (show $ i - 2) <> "/] " + handleLine' (Markup ms l) _ = "[markup " <> foldMap markup ms <> "]" <> handleLine' l T.empty <> "[/markup]" + where + markup Bold = "bold=true" + markup Underline = "underline=true" + markup DoubleHeight = "doubleHeight=true" + markup DoubleWidth = "doubleWidth=true" handleLine' (JuxtaPos ls) p = foldl (\p l -> p <> handleLine' l p) "" ls handleLine' (Line -> b) _ = LT.toStrict $ cotext b diff --git a/tp-bbcode/thermoprint-bbcode.cabal b/tp-bbcode/thermoprint-bbcode.cabal index b476753..89ed326 100644 --- a/tp-bbcode/thermoprint-bbcode.cabal +++ b/tp-bbcode/thermoprint-bbcode.cabal @@ -2,7 +2,7 @@ -- documentation, see http://haskell.org/cabal/users-guide/ name: thermoprint-bbcode -version: 2.0.0 +version: 2.0.1 synopsis: Parse bbcode for use in thermoprint -- description: homepage: http://dirty-haskell.org/tags/thermoprint.html diff --git a/tp-bbcode/thermoprint-bbcode.nix b/tp-bbcode/thermoprint-bbcode.nix index 27c3f60..3c698f1 100644 --- a/tp-bbcode/thermoprint-bbcode.nix +++ b/tp-bbcode/thermoprint-bbcode.nix @@ -4,7 +4,7 @@ }: mkDerivation { pname = "thermoprint-bbcode"; - version = "2.0.0"; + version = "2.0.1"; src = ./.; libraryHaskellDepends = [ base bbcode bytestring case-insensitive containers text -- cgit v1.2.3