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