pdd 0.7.2 → 0.7.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/pdd/source.rb +2 -2
- data/lib/pdd/version.rb +1 -1
- data/test/test_source.rb +1 -0
- metadata +1 -1
data/lib/pdd/source.rb
CHANGED
@@ -73,7 +73,7 @@ module PDD
|
|
73
73
|
begin
|
74
74
|
tail = tail(lines, match[1])
|
75
75
|
rescue Error => ex
|
76
|
-
raise Error, "#{ex.message} line ##{idx}"
|
76
|
+
raise Error, "#{ex.message} in line ##{idx}"
|
77
77
|
end
|
78
78
|
body = (match[3] + ' ' + tail.join(' ')).gsub(/\s+/, ' ').strip
|
79
79
|
Puzzle.new(
|
@@ -90,7 +90,7 @@ module PDD
|
|
90
90
|
lines
|
91
91
|
.take_while { |txt| txt.start_with?(prefix) }
|
92
92
|
.map { |txt| txt[prefix.length, txt.length] }
|
93
|
-
.take_while { |txt| txt =~ /^[ a-zA-Z0-9
|
93
|
+
.take_while { |txt| txt =~ /^[ a-zA-Z0-9]/ }
|
94
94
|
.each { |txt| fail Error, 'Space expected' unless txt.start_with?(' ') }
|
95
95
|
.each { |txt| fail Error, 'Too many spaces' if txt =~ /^\s{2,}/ }
|
96
96
|
.map { |txt| txt[1, txt.length] }
|
data/lib/pdd/version.rb
CHANGED
data/test/test_source.rb
CHANGED