Add line numbers to warnings

This commit is contained in:
Tristan Hume
2014-09-05 14:12:30 +00:00
committed by Florian Weingarten
parent 3a0ee6ae91
commit 27c1019385
4 changed files with 15 additions and 2 deletions
+1
View File
@@ -8,6 +8,7 @@ module Liquid
begin
return strict_parse_with_error_context(markup)
rescue SyntaxError => e
e.line_number = markup.line_number if markup.is_a?(Token)
@warnings ||= []
@warnings << e
return lax_parse(markup)