1
0
mirror of https://github.com/ryanoasis/nerd-fonts.git synced 2024-12-19 20:12:52 +02:00

cheat_sheet: Sort removed icons last

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
This commit is contained in:
Fini Jastrow 2023-05-30 11:45:01 +02:00
parent 156981d8f2
commit c06a149c9c

View File

@ -9,7 +9,7 @@ document.addEventListener('DOMContentLoaded', function () {
// Index all glyphs/icons
let miniSearch = new MiniSearch({
fields: ['id', 'code'], // fields to index for full-text search
fields: ['id', 'code', 'isNew'], // fields to index for full-text search
storeFields: ['id', 'code', 'isRemoved'], // fields to return with search results
})
miniSearch.addAll(Object.entries(glyphs).map(
@ -17,6 +17,7 @@ document.addEventListener('DOMContentLoaded', function () {
return {
id: key,
code: value,
isNew: key.startsWith('nfold') ? false : key,
}
}
));
@ -136,6 +137,7 @@ document.addEventListener('DOMContentLoaded', function () {
{
prefix: false,
combineWith: "AND",
boost: { isNew: 2 },
}
);