mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-12 23:40:45 -07:00
Covered changes with more tests, remove redundant cases, and the new with_error_mode(*modes)
Most of changes update this:
```
[:lax, :strict].each do |mode|
with_error_mode(mode) do
assert_template_result(...
```
to be this:
```
with_error_mode(:lax, :strict) do
assert_template_result(...
```
This commit is contained in:
committed by
Guilherme Carreiro
parent
a23c71e40b
commit
018442b7d1
@@ -123,7 +123,6 @@ module Liquid
|
||||
block.attach(body)
|
||||
@blocks << block
|
||||
|
||||
# Temporarily until support :or lexeme.
|
||||
break unless parser.id?('or') || parser.consume?(:comma)
|
||||
end
|
||||
|
||||
|
||||
@@ -90,7 +90,6 @@ module Liquid
|
||||
end
|
||||
end
|
||||
|
||||
# Temporarily until we migrate
|
||||
def strict_parse(markup)
|
||||
lax_parse(markup)
|
||||
end
|
||||
|
||||
@@ -24,8 +24,8 @@ module Liquid
|
||||
# Sets how strict the parser should be.
|
||||
# :lax acts like liquid 2.5 and silently ignores malformed tags in most cases.
|
||||
# :warn is the default and will give deprecation warnings when invalid syntax is used.
|
||||
# :strict will enforce correct syntax.
|
||||
# :rigid is stricter even.
|
||||
# :strict enforces correct syntax for most tags
|
||||
# :rigid enforces correct syntax for all tags
|
||||
def error_mode=(mode)
|
||||
Deprecations.warn("Template.error_mode=", "Environment#error_mode=")
|
||||
Environment.default.error_mode = mode
|
||||
|
||||
Reference in New Issue
Block a user