From 11a3a881157494508593bc2323fbc62b6ee04b5f Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 10 Jan 2016 00:29:53 +0000 Subject: Another off by one --- spec/src/Thermoprint/Printout.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'spec/src/Thermoprint') 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 -- @ -- either id Line . `text` -- @ -cotext (VSpace n) = TL.pack . genericReplicate (n - 1) $ '\n' +cotext (VSpace n) = TL.pack . genericReplicate n $ '\n' cotext (NewlSep xs) = TL.intercalate "\n" . map cotext . toList $ xs cotext (Line x) = cotext' x where cotext' (Word x) = x - cotext' (HSpace n) = TL.pack . genericReplicate (n - 1) $ ' ' + cotext' (HSpace n) = TL.pack . genericReplicate n $ ' ' cotext' (SpaceSep xs) = TL.intercalate " " . map cotext' . toList $ xs prop_text :: Property -- cgit v1.2.3