Skip to content

Commit

Permalink
#19 line number
Browse files Browse the repository at this point in the history
  • Loading branch information
Yegor Bugayenko committed Nov 4, 2014
1 parent 698a0d9 commit 3f6fb87
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/pdd/source.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,11 @@ def minutes(num, units)

# Fetch puzzle
def puzzle(lines, match, idx)
tail = tail(lines, match[1])
begin
tail = tail(lines, match[1])
rescue Error => ex
raise Error, "#{ex.message} line ##{idx}"
end
body = (match[3] + ' ' + tail.join(' ')).gsub(/\s+/, ' ').strip
Puzzle.new(
marker(match[2]).merge(
Expand Down

0 comments on commit 3f6fb87

Please sign in to comment.