mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-15 08:50:45 -07:00
more micro optimization
This commit is contained in:
@@ -96,15 +96,18 @@ module Liquid
|
||||
|
||||
byte_b = @ss.peek_byte
|
||||
|
||||
if byte_b != CLOSE_CURLEY && byte_b != PERCENTAGE
|
||||
@ss.pos += 1
|
||||
byte_a = byte_b
|
||||
next
|
||||
end
|
||||
|
||||
if byte_a == CLOSE_CURLEY && byte_b == CLOSE_CURLEY
|
||||
@ss.pos += 1
|
||||
return @ss.string.byteslice(start, @ss.pos - start)
|
||||
elsif byte_a == OPEN_CURLEY && byte_b == PERCENTAGE
|
||||
return next_tag_token(start)
|
||||
end
|
||||
|
||||
byte_a = byte_b
|
||||
@ss.pos += 1
|
||||
end
|
||||
|
||||
return "{{"
|
||||
|
||||
Reference in New Issue
Block a user