mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-18 10:20:43 -07:00
checkpoint
This commit is contained in:
@@ -14,17 +14,17 @@ module Liquid
|
||||
# value
|
||||
# {% endsnippet %}
|
||||
class Snippet < Block
|
||||
# SYNTAX = /(#{QuotedString}+) +\|(#{VariableSegment}*)\|/o
|
||||
SYNTAX = /(#{QuotedString}+)/o
|
||||
SYNTAX = /(#{QuotedString}+) +\|(#{VariableSegment}*)\|/o
|
||||
def initialize(tag_name, markup, options)
|
||||
super
|
||||
|
||||
if markup =~ SYNTAX
|
||||
# binding.irb
|
||||
@to = Regexp.last_match(1)
|
||||
# arg = Regexp.last_match(2)
|
||||
arg = Regexp.last_match(2)
|
||||
|
||||
# @args = []
|
||||
# @args << arg if arg
|
||||
@args = []
|
||||
@args << arg if arg
|
||||
else
|
||||
raise SyntaxError, options[:locale].t("errors.syntax.snippet")
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user