mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-16 09:20:42 -07:00
use byteslice to create Variable BlockBody
This commit is contained in:
@@ -251,8 +251,9 @@ module Liquid
|
||||
i = 3 if token[i] == "-"
|
||||
parse_end = token.length - 3
|
||||
parse_end -= 1 if token[parse_end] == "-"
|
||||
markup_end = parse_end - i + 1
|
||||
markup = markup_end <= 0 ? "" : token.byteslice(i, markup_end)
|
||||
|
||||
markup = token[i..parse_end]
|
||||
return Variable.new(markup, parse_context)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user