diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2016-01-10 00:29:53 +0000 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2016-01-10 00:29:53 +0000 |
commit | 11a3a881157494508593bc2323fbc62b6ee04b5f (patch) | |
tree | 3b334177cb3bc1d8ebc31231ea0e099d8305f4dc /spec | |
parent | 3d0621a8747a4977f6f8bc72e8a11386c7cb2e73 (diff) | |
download | thermoprint-11a3a881157494508593bc2323fbc62b6ee04b5f.tar thermoprint-11a3a881157494508593bc2323fbc62b6ee04b5f.tar.gz thermoprint-11a3a881157494508593bc2323fbc62b6ee04b5f.tar.bz2 thermoprint-11a3a881157494508593bc2323fbc62b6ee04b5f.tar.xz thermoprint-11a3a881157494508593bc2323fbc62b6ee04b5f.zip |
Another off by one
Diffstat (limited to 'spec')
-rw-r--r-- | spec/src/Thermoprint/Printout.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/src/Thermoprint/Printout.hs b/spec/src/Thermoprint/Printout.hs index c96573e..7c6d5c0 100644 --- a/spec/src/Thermoprint/Printout.hs +++ b/spec/src/Thermoprint/Printout.hs | |||
@@ -141,12 +141,12 @@ cotext :: Block -> Text | |||
141 | -- @ | 141 | -- @ |
142 | -- either id Line . `text` | 142 | -- either id Line . `text` |
143 | -- @ | 143 | -- @ |
144 | cotext (VSpace n) = TL.pack . genericReplicate (n - 1) $ '\n' | 144 | cotext (VSpace n) = TL.pack . genericReplicate n $ '\n' |
145 | cotext (NewlSep xs) = TL.intercalate "\n" . map cotext . toList $ xs | 145 | cotext (NewlSep xs) = TL.intercalate "\n" . map cotext . toList $ xs |
146 | cotext (Line x) = cotext' x | 146 | cotext (Line x) = cotext' x |
147 | where | 147 | where |
148 | cotext' (Word x) = x | 148 | cotext' (Word x) = x |
149 | cotext' (HSpace n) = TL.pack . genericReplicate (n - 1) $ ' ' | 149 | cotext' (HSpace n) = TL.pack . genericReplicate n $ ' ' |
150 | cotext' (SpaceSep xs) = TL.intercalate " " . map cotext' . toList $ xs | 150 | cotext' (SpaceSep xs) = TL.intercalate " " . map cotext' . toList $ xs |
151 | 151 | ||
152 | prop_text :: Property | 152 | prop_text :: Property |