Truncate lines in parser errors.
The offending lines of code displayed in the error message are truncated to 80 characters. This should make reading the error messages less of a pain when dealing with very long lines of HTML/XML.
This commit is contained in:
parent
292a98d7f6
commit
c974b96b88
|
@ -204,7 +204,13 @@ end
|
||||||
prefix = ' '
|
prefix = ' '
|
||||||
end
|
end
|
||||||
|
|
||||||
code << "#{prefix}#{number}: #{line.strip}\n"
|
line = line.strip
|
||||||
|
|
||||||
|
if line.length > 80
|
||||||
|
line = line[0..79] + ' (more)'
|
||||||
|
end
|
||||||
|
|
||||||
|
code << "#{prefix}#{number}: #{line}\n"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue