Commit 01161074 authored by Dave Machado's avatar Dave Machado
Browse files

pop main logic out one level by reversing condition

parent 8c74f6fe
......@@ -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
......@@ -79,7 +79,6 @@ File.foreach(filename).with_index do | line, line_num |
if !link_val.start_with?("[Go!](") || !link_val.end_with?(')')
add_error(line_num, INDEX_LINK, "format should be \"[Go!](<LINK>)\": #{link_val}")
end
end
end
$errors.each do | e |
puts e
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment