From d9c2bb8e4cfdcdbf0850c4191699e6a33a895354 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Mon, 25 Apr 2016 13:55:39 -0400 Subject: [PATCH] Strip newlines in the output diff. --- test/AlignmentSpec.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/AlignmentSpec.hs b/test/AlignmentSpec.hs index b19baa6d9..7f82ebd88 100644 --- a/test/AlignmentSpec.hs +++ b/test/AlignmentSpec.hs @@ -119,5 +119,5 @@ instance Show PrettyDiff where This before -> let beforeString = showDiff before (fst sources) in beforeString ++ showString (replicate (max 0 (min n (n - length beforeString))) ' ') " | " That after -> showString (replicate n ' ') (showString " | " (showDiff after (snd sources))) These before after -> showDiff before (fst sources) ++ showString " | " (showDiff after (snd sources)) - showDiff diff = toList . Source.slice (getRange diff) + showDiff diff = toList . stripNewlines . Source.slice (getRange diff) stripNewlines = fmap (\ c -> if c == '\n' then ' ' else c)