Skip to content

Commit

Permalink
use byteslice to create Variable BlockBody
Browse files Browse the repository at this point in the history
  • Loading branch information
ggmichaelgo committed Oct 25, 2024
1 parent cb16219 commit 5245128
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/liquid/block_body.rb
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,8 @@ def create_variable(token, parse_context)
i = 3 if token[i] == "-"
parse_end = token.length - 3
parse_end -= 1 if token[parse_end] == "-"
markup = parse_end - i + 1 <= 0 ? "" : token.byteslice(i, parse_end - i + 1)

markup = token[i..parse_end]
return Variable.new(markup, parse_context)
end

Expand Down

0 comments on commit 5245128

Please sign in to comment.