pop main logic out one level by reversing condition

This commit is contained in:
Dave Machado 2017-07-28 14:35:32 -04:00
parent 8c74f6fe68
commit 01161074fa

View File

@ -31,9 +31,9 @@ end
File.foreach(filename).with_index do | line, line_num |
line_num += 1
if line.start_with?('|')
# Skip table schema lines
if line.eql? "|---|---|---|---|---|\n"
# Skip non-markdown table lines and table schema lines
if !line.start_with?('|') || line.eql?("|---|---|---|---|---|\n")
next
end
@ -80,7 +80,6 @@ File.foreach(filename).with_index do | line, line_num |
add_error(line_num, INDEX_LINK, "format should be \"[Go!](<LINK>)\": #{link_val}")
end
end
end
$errors.each do | e |
puts e
end