changed: autocomplete multiple tags

This commit is contained in:
quenousimporte 2023-10-17 17:11:04 +02:00
parent a38c7f9e58
commit 553c8a0701
1 changed files with 8 additions and 5 deletions

13
main.js
View File

@ -2112,11 +2112,14 @@ function applycolors()
if (slashpos > spacepos)
{
var snippetpart = raw.substring(slashpos);
var snippet = snippets.find(s => s.command.startsWith(snippetpart));
if (snippet)
{
line += "<span style='color:lightgrey'>" + snippet.command.substr(pos - slashpos) + "</span>";
}
var matching = snippets
.filter(s => s.command.startsWith(snippetpart))
.map(s => s.command.substring(1));
line += "<span style='color:lightgrey'>";
line += matching.join().substr(pos - slashpos - 1);
line += "</span>";
}
}
}