mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-19 02:40:41 -07:00
Use parse_context or options instead of @options.
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
module Liquid
|
||||
module ParserSwitching
|
||||
def parse_with_selected_parser(markup)
|
||||
case @options.error_mode
|
||||
case parse_context.error_mode
|
||||
when :strict then strict_parse_with_error_context(markup)
|
||||
when :lax then lax_parse(markup)
|
||||
when :warn
|
||||
begin
|
||||
return strict_parse_with_error_context(markup)
|
||||
rescue SyntaxError => e
|
||||
@options.warnings << e
|
||||
parse_context.warnings << e
|
||||
return lax_parse(markup)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user