Use parse_context or options instead of @options.

This commit is contained in:
Dylan Thacker-Smith
2015-07-08 19:21:59 -04:00
parent 920e1df643
commit c45310170b
6 changed files with 18 additions and 16 deletions
+2 -2
View File
@@ -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