mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-30 12:14:05 -05:00
Refactor score calculation
This commit is contained in:
parent
936278b045
commit
c9cda16a5e
1 changed files with 2 additions and 1 deletions
|
@ -83,6 +83,7 @@ define [], () ->
|
||||||
completions = []
|
completions = []
|
||||||
for command in commands
|
for command in commands
|
||||||
caption = "\\#{command[0]}"
|
caption = "\\#{command[0]}"
|
||||||
|
score = if prefix == caption then 99 else 50
|
||||||
snippet = caption
|
snippet = caption
|
||||||
i = 1
|
i = 1
|
||||||
_.times command[1], () ->
|
_.times command[1], () ->
|
||||||
|
@ -97,7 +98,7 @@ define [], () ->
|
||||||
caption: caption
|
caption: caption
|
||||||
snippet: snippet
|
snippet: snippet
|
||||||
meta: "cmd"
|
meta: "cmd"
|
||||||
score: if prefix == caption then 99 else 50
|
score: score
|
||||||
}
|
}
|
||||||
|
|
||||||
callback null, completions
|
callback null, completions
|
||||||
|
|
Loading…
Reference in a new issue