Right now we have the following structure so there are several useless regexp compling calls due to avoiding .include? 'todo' line.
def check_rules(line)
/[^\s]\x40todo/.match(line) do |_|
raise Error, get_no_leading_space_error("\x40todo")
end
...
end
...
def match_markers(l)
if l.downcase.include? 'todo'
...
begin
check_rules(line)
match_markers(line).each do |m|
puzzles << puzzle(lines.drop(idx + 1), m, idx)
end
....
Right now we have the following structure so there are several useless regexp compling calls due to avoiding .include? 'todo' line.