mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-15 08:50:45 -07:00
Experiment: Hardcode parser to :strict everywhere
This commit is contained in:
@@ -4,10 +4,6 @@ module Liquid
|
||||
# The Environment is the container for all configuration options of Liquid, such as
|
||||
# the registered tags, filters, and the default error mode.
|
||||
class Environment
|
||||
# The default error mode for all templates. This can be overridden on a
|
||||
# per-template basis.
|
||||
attr_accessor :error_mode
|
||||
|
||||
# The tags that are available to use in the template.
|
||||
attr_accessor :tags
|
||||
|
||||
@@ -75,7 +71,7 @@ module Liquid
|
||||
# @api private
|
||||
def initialize
|
||||
@tags = Tags::STANDARD_TAGS.dup
|
||||
@error_mode = :lax
|
||||
@error_mode = :strict
|
||||
@strainer_template = Class.new(StrainerTemplate).tap do |klass|
|
||||
klass.add_filter(StandardFilters)
|
||||
end
|
||||
@@ -85,6 +81,14 @@ module Liquid
|
||||
@strainer_template_class_cache = {}
|
||||
end
|
||||
|
||||
def error_mode
|
||||
:strict
|
||||
end
|
||||
|
||||
def error_mode=(mode)
|
||||
:strict
|
||||
end
|
||||
|
||||
# Registers a new tag with the environment.
|
||||
#
|
||||
# @param name [String] The name of the tag.
|
||||
|
||||
@@ -27,11 +27,11 @@ module Liquid
|
||||
# :strict will enforce correct syntax.
|
||||
def error_mode=(mode)
|
||||
Deprecations.warn("Template.error_mode=", "Environment#error_mode=")
|
||||
Environment.default.error_mode = mode
|
||||
Environment.default.error_mode = :strict
|
||||
end
|
||||
|
||||
def error_mode
|
||||
Environment.default.error_mode
|
||||
:strict
|
||||
end
|
||||
|
||||
def default_exception_renderer=(renderer)
|
||||
|
||||
Reference in New Issue
Block a user