mirror of
https://github.com/kemko/liquid.git
synced 2026-01-01 15:55:40 +03:00
Use .last instead of pop push method for updating last node in nodelist
This commit is contained in:
@@ -56,10 +56,9 @@ module Liquid
|
||||
|
||||
def whitespace_handler(token, parse_context)
|
||||
if token[2] == WhitespaceControl
|
||||
previous_token = @nodelist.pop
|
||||
previous_token = @nodelist.last
|
||||
if previous_token.is_a? String
|
||||
previous_token.rstrip!
|
||||
@nodelist << previous_token
|
||||
end
|
||||
end
|
||||
parse_context.trim_whitespace = (token[-3] == WhitespaceControl)
|
||||
|
||||
Reference in New Issue
Block a user