|
@@ -90,14 +90,14 @@ task :lint do
|
|
case link.scan('->').length
|
|
case link.scan('->').length
|
|
when 0
|
|
when 0
|
|
#puts("link contains no ->, probably not a problem")
|
|
#puts("link contains no ->, probably not a problem")
|
|
- next
|
|
|
|
|
|
+ text = link
|
|
when 1
|
|
when 1
|
|
# no problem
|
|
# no problem
|
|
|
|
+ text, dest = link.split('->')
|
|
else
|
|
else
|
|
puts("link contains multiple -> definitely a problem")
|
|
puts("link contains multiple -> definitely a problem")
|
|
next
|
|
next
|
|
end
|
|
end
|
|
- text, dest = link.split('->')
|
|
|
|
if text.start_with?('\'')
|
|
if text.start_with?('\'')
|
|
if !text.end_with?('\'')
|
|
if !text.end_with?('\'')
|
|
puts("#{filename}:#{lineno} link text (#{text.inspect}) does not end with single quote despite starting with one")
|
|
puts("#{filename}:#{lineno} link text (#{text.inspect}) does not end with single quote despite starting with one")
|
|
@@ -129,7 +129,6 @@ task :lint do
|
|
elsif text =~ /\A[\[\]'"\\]*\Z/
|
|
elsif text =~ /\A[\[\]'"\\]*\Z/
|
|
puts "#{filename}:#{lineno} link text (#{text.inspect}) contains special characters but is not quoted with single or double quotes"
|
|
puts "#{filename}:#{lineno} link text (#{text.inspect}) contains special characters but is not quoted with single or double quotes"
|
|
end
|
|
end
|
|
- #puts(dest)
|
|
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|