Skip to content

Commit

Permalink
cheat_sheet: Sort removed icons last
Browse files Browse the repository at this point in the history
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
  • Loading branch information
Finii committed May 30, 2023
1 parent 70db87e commit ad4c9bc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cheat-sheet.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@ 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(
([key, value]) => {
return {
id: key,
code: value,
isNew: key.startsWith('nfold') ? false : key,
}
}
));
Expand Down Expand Up @@ -136,6 +137,7 @@ document.addEventListener('DOMContentLoaded', function () {
{
prefix: false,
combineWith: "AND",
boost: { isNew: 2 },
}
);

Expand Down

0 comments on commit ad4c9bc

Please sign in to comment.