This commit is contained in:
hrsh7th
2021-10-19 14:38:10 +09:00
parent bad20dea88
commit c57969580d
2 changed files with 4 additions and 0 deletions

View File

@@ -29,6 +29,7 @@ describe('matcher', function()
assert.is.truthy(matcher.match('usela', 'useLayoutEffect') > matcher.match('usela', 'useDataLayer')) assert.is.truthy(matcher.match('usela', 'useLayoutEffect') > matcher.match('usela', 'useDataLayer'))
assert.is.truthy(matcher.match('true', 'v:true', { 'true' }) == matcher.match('true', 'true')) assert.is.truthy(matcher.match('true', 'v:true', { 'true' }) == matcher.match('true', 'true'))
assert.is.truthy(matcher.match('g', 'get', { 'get' }) > matcher.match('g', 'dein#get', { 'dein#get' })) assert.is.truthy(matcher.match('g', 'get', { 'get' }) > matcher.match('g', 'dein#get', { 'dein#get' }))
assert.is.truthy(matcher.match('2', '[[2021') >= 1)
end) end)
it('debug', function() it('debug', function()

View File

@@ -82,6 +82,9 @@ char.is_semantic_index = function(text, index)
if not char.is_alpha(prev) and char.is_alpha(curr) then if not char.is_alpha(prev) and char.is_alpha(curr) then
return true return true
end end
if not char.is_digit(prev) and char.is_digit(curr) then
return true
end
return false return false
end end