liquid 5.6.1 → 5.6.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/liquid/expression.rb +9 -2
- data/lib/liquid/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 10cee5025e1d7aaf5b3f207dddabd922888ce66110ecc862e4749eee5fbe3648
|
4
|
+
data.tar.gz: 96d7ebba4fd8874e49179a67465c469830d557abc12b8372defe2f3e91ea3f82
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 53c249e54f83b52af9630859da7e28a1dcc897224fbae847d27598c287c3855b7a237c49fa31b2ca0fc03f317f116d7a5117c8edfdc046985dce3794913aa16a
|
7
|
+
data.tar.gz: 71fcc34c63d98c1ea886cb3817023a0341051ed2e2b0ae79b27939d91661f5b0b11e6ffed2ead73584d40cb1b2c7c19064af599c5aa3b49e1b64bcdaff0a0d97
|
data/lib/liquid/expression.rb
CHANGED
@@ -79,10 +79,17 @@ module Liquid
|
|
79
79
|
end
|
80
80
|
|
81
81
|
ss.string = markup
|
82
|
-
# the first byte must be a digit
|
82
|
+
# the first byte must be a digit or a dash
|
83
83
|
byte = ss.scan_byte
|
84
84
|
|
85
|
-
return false if byte != DASH &&
|
85
|
+
return false if byte != DASH && (byte < ZERO || byte > NINE)
|
86
|
+
|
87
|
+
if byte == DASH
|
88
|
+
peek_byte = ss.peek_byte
|
89
|
+
|
90
|
+
# if it starts with a dash, the next byte must be a digit
|
91
|
+
return false if peek_byte.nil? || !(peek_byte >= ZERO && peek_byte <= NINE)
|
92
|
+
end
|
86
93
|
|
87
94
|
# The markup could be a float with multiple dots
|
88
95
|
first_dot_pos = nil
|
data/lib/liquid/version.rb
CHANGED