lib/jsonpath/parser.rb in jsonpath-1.0.3 vs lib/jsonpath/parser.rb in jsonpath-1.0.4
- old
+ new
@@ -63,10 +63,10 @@
end
scanner = StringScanner.new(exp)
elements = []
until scanner.eos?
if (t = scanner.scan(/\['[a-zA-Z@&*\/$%^?_]+'\]|\.[a-zA-Z0-9_]+[?!]?/))
- elements << t.gsub(/[\[\]'\.]|\s+/, '')
+ elements << t.gsub(/[\[\]'.]|\s+/, '')
elsif (t = scanner.scan(/(\s+)?[<>=!\-+][=~]?(\s+)?/))
operator = t
elsif (t = scanner.scan(/(\s+)?'?.*'?(\s+)?/))
# If we encounter a node which does not contain `'` it means
# that we are dealing with a boolean type.