Skip to content

Commit

Permalink
Set priority of word combinations by length#38
Browse files Browse the repository at this point in the history
  • Loading branch information
sawhney17 committed Oct 21, 2022
1 parent 5e433e8 commit f60034d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ async function getPages() {
.map((x) => x[0]["original-name"])
.filter((x) => x);
pageList.concat(await fetchAliases());
//Reverse sort pagelist on the basis of length so that longer page names are matched first
pageList.sort((a, b) => b.length - a.length);
console.log({ LogseqAutomaticLinker: "getPages", results, pageList });
});
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "logseq-automatic-linker",
"version": "1.3.2",
"version": "1.4.0",
"description": "A plugin to automatically create links. ",
"main": "dist/index.html",
"targets": {
Expand Down

0 comments on commit f60034d

Please sign in to comment.