diff options
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 |
