mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 03:05:11 -07:00
runtime/msgpack: Fix inf/nan regexp
Not making minus sign optional as inf/nan without optional minus should’ve already been handled by the very first case.
This commit is contained in:
parent
51d42917f0
commit
b728aad212
@ -605,13 +605,10 @@ function msgpack#eval(s, special_objs) abort
|
||||
call add(expr, dec)
|
||||
endif
|
||||
endif
|
||||
elseif s =~# '-\?\%(inf\|nan\)'
|
||||
if s[0] is# '-'
|
||||
elseif s =~# '\v^\-%(inf|nan)'
|
||||
call add(expr, '-')
|
||||
let s = s[1:]
|
||||
endif
|
||||
call add(expr, s:MSGPACK_SPECIAL_OBJECTS[s[0:2]])
|
||||
let s = s[3:]
|
||||
call add(expr, s:MSGPACK_SPECIAL_OBJECTS[s[1:3]])
|
||||
let s = s[4:]
|
||||
elseif stridx('="+', s[0]) != -1
|
||||
let match = matchlist(s, '\v\C^(\=|\+\((\-?\d+)\)|)(\"%(\\.|[^\\"]+)*\")')
|
||||
if empty(match)
|
||||
|
Loading…
Reference in New Issue
Block a user