mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-19 02:40:41 -07:00
Rename {% doc %} constant strictly validates the abscense of args
This commit is contained in:
@@ -25,7 +25,7 @@ module Liquid
|
|||||||
# {% enddoc %}
|
# {% enddoc %}
|
||||||
# {{ foo }}, {{ bar }}!
|
# {{ foo }}, {{ bar }}!
|
||||||
class Doc < Block
|
class Doc < Block
|
||||||
TAG_UNEXPECTED_ARGS = /\A\s*\z/
|
NO_UNEXPECTED_ARGS = /\A\s*\z/
|
||||||
|
|
||||||
def initialize(tag_name, markup, parse_context)
|
def initialize(tag_name, markup, parse_context)
|
||||||
super
|
super
|
||||||
@@ -58,7 +58,7 @@ module Liquid
|
|||||||
private
|
private
|
||||||
|
|
||||||
def ensure_valid_markup(tag_name, markup, parse_context)
|
def ensure_valid_markup(tag_name, markup, parse_context)
|
||||||
unless TAG_UNEXPECTED_ARGS.match?(markup)
|
unless NO_UNEXPECTED_ARGS.match?(markup)
|
||||||
raise SyntaxError, parse_context.locale.t("errors.syntax.block_tag_unexpected_args", tag: tag_name)
|
raise SyntaxError, parse_context.locale.t("errors.syntax.block_tag_unexpected_args", tag: tag_name)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user