mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 06:03:45 +01:00
Refactor score calculation
This commit is contained in:
+2
-1
@@ -83,6 +83,7 @@ define [], () ->
|
||||
completions = []
|
||||
for command in commands
|
||||
caption = "\\#{command[0]}"
|
||||
score = if prefix == caption then 99 else 50
|
||||
snippet = caption
|
||||
i = 1
|
||||
_.times command[1], () ->
|
||||
@@ -97,7 +98,7 @@ define [], () ->
|
||||
caption: caption
|
||||
snippet: snippet
|
||||
meta: "cmd"
|
||||
score: if prefix == caption then 99 else 50
|
||||
score: score
|
||||
}
|
||||
|
||||
callback null, completions
|
||||
|
||||
Reference in New Issue
Block a user