aboutsummaryrefslogtreecommitdiff
path: root/spec/src/Thermoprint/Printout.hs
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2016-01-09 23:25:46 +0000
committerGregor Kleen <gkleen@yggdrasil.li>2016-01-09 23:25:46 +0000
commitb72960db52c182710db4aa9be783439a74beadca (patch)
treeb94cd5a660d309bbbf3631e668e0c2378a292089 /spec/src/Thermoprint/Printout.hs
parent224a26568718505a8c5937098c7990c41c9ed465 (diff)
downloadthermoprint-b72960db52c182710db4aa9be783439a74beadca.tar
thermoprint-b72960db52c182710db4aa9be783439a74beadca.tar.gz
thermoprint-b72960db52c182710db4aa9be783439a74beadca.tar.bz2
thermoprint-b72960db52c182710db4aa9be783439a74beadca.tar.xz
thermoprint-b72960db52c182710db4aa9be783439a74beadca.zip
Fixed fencepost mistake
Diffstat (limited to 'spec/src/Thermoprint/Printout.hs')
-rw-r--r--spec/src/Thermoprint/Printout.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/src/Thermoprint/Printout.hs b/spec/src/Thermoprint/Printout.hs
index d13d02e..442c2a3 100644
--- a/spec/src/Thermoprint/Printout.hs
+++ b/spec/src/Thermoprint/Printout.hs
@@ -118,11 +118,11 @@ text t = case splitLines t of
118 $ TL.split isSpace t 118 $ TL.split isSpace t
119 toBlock [] = mempty 119 toBlock [] = mempty
120 toBlock xs@(x:_) 120 toBlock xs@(x:_)
121 | TL.null x = VSpace $ genericLength xs 121 | TL.null x = VSpace $ genericLength xs - 1
122 | otherwise = mconcat . map (Line . mconcat . splitWords) $ xs 122 | otherwise = mconcat . map (Line . mconcat . splitWords) $ xs
123 toLine [] = mempty 123 toLine [] = mempty
124 toLine xs@(x:_) 124 toLine xs@(x:_)
125 | TL.null x = HSpace $ genericLength xs 125 | TL.null x = HSpace $ genericLength xs - 1
126 | otherwise = mconcat . map Word $ xs 126 | otherwise = mconcat . map Word $ xs
127 list :: b -> (a -> [a] -> b) -> [a] -> b 127 list :: b -> (a -> [a] -> b) -> [a] -> b
128 list c _ [] = c 128 list c _ [] = c