aboutsummaryrefslogtreecommitdiff
path: root/spec/src/Thermoprint/Printout.hs
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2016-01-10 00:29:53 +0000
committerGregor Kleen <gkleen@yggdrasil.li>2016-01-10 00:29:53 +0000
commit11a3a881157494508593bc2323fbc62b6ee04b5f (patch)
tree3b334177cb3bc1d8ebc31231ea0e099d8305f4dc /spec/src/Thermoprint/Printout.hs
parent3d0621a8747a4977f6f8bc72e8a11386c7cb2e73 (diff)
downloadthermoprint-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/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 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-- @
144cotext (VSpace n) = TL.pack . genericReplicate (n - 1) $ '\n' 144cotext (VSpace n) = TL.pack . genericReplicate n $ '\n'
145cotext (NewlSep xs) = TL.intercalate "\n" . map cotext . toList $ xs 145cotext (NewlSep xs) = TL.intercalate "\n" . map cotext . toList $ xs
146cotext (Line x) = cotext' x 146cotext (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
152prop_text :: Property 152prop_text :: Property