aboutsummaryrefslogtreecommitdiff
path: root/tp-bbcode
diff options
context:
space:
mode:
authorGregor Kleen <pngwjpgh@users.noreply.github.com>2017-01-25 15:54:54 +0100
committerGregor Kleen <pngwjpgh@users.noreply.github.com>2017-01-25 15:54:54 +0100
commit75d9fe614dca572aa1d7cfa53553e9c103eb2dd0 (patch)
tree54def052dcd8f288baead536a5f80d41a00387ef /tp-bbcode
parent99fc4947543c1916e9fec952526a688eb7753490 (diff)
downloadthermoprint-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.hs6
-rw-r--r--tp-bbcode/thermoprint-bbcode.cabal2
-rw-r--r--tp-bbcode/thermoprint-bbcode.nix2
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
4name: thermoprint-bbcode 4name: thermoprint-bbcode
5version: 2.0.0 5version: 2.0.1
6synopsis: Parse bbcode for use in thermoprint 6synopsis: Parse bbcode for use in thermoprint
7-- description: 7-- description:
8homepage: http://dirty-haskell.org/tags/thermoprint.html 8homepage: 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}:
5mkDerivation { 5mkDerivation {
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