liquid 5.6.1 → 5.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f56c8d1a7b6c038267d7e838aae2d8dba5c99e5fbb563d1163966cbbc9b60673
4
- data.tar.gz: c26e7a9288ee25b325ff6f2db4d21b8ed4f9ad97eb64f1aebeefd971e5c5bc46
3
+ metadata.gz: 10cee5025e1d7aaf5b3f207dddabd922888ce66110ecc862e4749eee5fbe3648
4
+ data.tar.gz: 96d7ebba4fd8874e49179a67465c469830d557abc12b8372defe2f3e91ea3f82
5
5
  SHA512:
6
- metadata.gz: a81801d7e2976bd5825e19349a410c5800e85c30d31502da013cab9b95fff5cdeb7debcd9e7ccedee4a3056456ed3433a3c8751258f89c9a24c8b46a223e2f19
7
- data.tar.gz: b81704d1039698ce2e0391ad2bfbb6d69daba677dfbc1d4180bb7b6a4018981ed7984af44b64de84d8c745561cacf86999a1f326d1045296d696c5b62edd8849
6
+ metadata.gz: 53c249e54f83b52af9630859da7e28a1dcc897224fbae847d27598c287c3855b7a237c49fa31b2ca0fc03f317f116d7a5117c8edfdc046985dce3794913aa16a
7
+ data.tar.gz: 71fcc34c63d98c1ea886cb3817023a0341051ed2e2b0ae79b27939d91661f5b0b11e6ffed2ead73584d40cb1b2c7c19064af599c5aa3b49e1b64bcdaff0a0d97
@@ -79,10 +79,17 @@ module Liquid
79
79
  end
80
80
 
81
81
  ss.string = markup
82
- # the first byte must be a digit, a period, or a dash
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 && byte != DOT && (byte < ZERO || byte > NINE)
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
@@ -2,5 +2,5 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Liquid
5
- VERSION = "5.6.1"
5
+ VERSION = "5.6.2"
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: liquid
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.6.1
4
+ version: 5.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tobias Lütke