From de8381b7f7441c3b5e0e38b1f475bd9c4c54b8ab Mon Sep 17 00:00:00 2001 From: Yegor Bugayenko Date: Thu, 4 Dec 2014 23:47:42 +0200 Subject: [PATCH] #23 remove spaces --- lib/pdd/source.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pdd/source.rb b/lib/pdd/source.rb index eacca87..b15574f 100644 --- a/lib/pdd/source.rb +++ b/lib/pdd/source.rb @@ -75,7 +75,7 @@ def puzzle(lines, match, idx) rescue Error => ex raise Error, "#{ex.message} in line ##{idx}" end - body = (match[3] + ' ' + tail.join(' ')).gsub(/\s+/, ' ').strip + body = (match[3] + ' ' + tail.join(' ')).gsub(/[\s\n\t]+/, ' ').strip Puzzle.new( marker(match[2]).merge( lines: "#{idx + 1}-#{idx + tail.size + 1}",