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 | |
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')
-rw-r--r-- | tp-bbcode/src/Thermoprint/Printout/BBCode/Inverse.hs | 6 | ||||
-rw-r--r-- | tp-bbcode/thermoprint-bbcode.cabal | 2 | ||||
-rw-r--r-- | tp-bbcode/thermoprint-bbcode.nix | 2 |
3 files changed, 8 insertions, 2 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 |
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 @@ | |||
2 | -- documentation, see http://haskell.org/cabal/users-guide/ | 2 | -- documentation, see http://haskell.org/cabal/users-guide/ |
3 | 3 | ||
4 | name: thermoprint-bbcode | 4 | name: thermoprint-bbcode |
5 | version: 2.0.0 | 5 | version: 2.0.1 |
6 | synopsis: Parse bbcode for use in thermoprint | 6 | synopsis: Parse bbcode for use in thermoprint |
7 | -- description: | 7 | -- description: |
8 | homepage: http://dirty-haskell.org/tags/thermoprint.html | 8 | 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 @@ | |||
4 | }: | 4 | }: |
5 | mkDerivation { | 5 | mkDerivation { |
6 | pname = "thermoprint-bbcode"; | 6 | pname = "thermoprint-bbcode"; |
7 | version = "2.0.0"; | 7 | version = "2.0.1"; |
8 | src = ./.; | 8 | src = ./.; |
9 | libraryHaskellDepends = [ | 9 | libraryHaskellDepends = [ |
10 | base bbcode bytestring case-insensitive containers text | 10 | base bbcode bytestring case-insensitive containers text |