mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-18 18:30:40 -07:00
Add line numbers to warnings
This commit is contained in:
committed by
Florian Weingarten
parent
3a0ee6ae91
commit
27c1019385
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user