Changelog

This commit is contained in:
Zef Hemel
2022-12-19 13:42:20 +01:00
parent 6444824f5c
commit 6897111cf9
6 changed files with 49 additions and 21 deletions
+21 -1
View File
@@ -23,7 +23,16 @@ async function actionClickOrActionEnter(
return;
}
const navigationNodeFinder = (t: ParseTree) =>
["WikiLink", "Link", "Image", "URL", "NakedURL", "Link", "CommandLink"]
[
"WikiLink",
"Link",
"Image",
"URL",
"NakedURL",
"Link",
"CommandLink",
"PageRef",
]
.includes(
t.type!,
);
@@ -49,6 +58,17 @@ async function actionClickOrActionEnter(
await editor.navigate(pageLink, pos, false, inNewWindow);
break;
}
case "PageRef": {
const bracketedPageRef = mdTree.children![0].text!;
await editor.navigate(
// Slicing off the initial [[ and final ]]
bracketedPageRef.substring(2, bracketedPageRef.length - 2),
0,
false,
inNewWindow,
);
break;
}
case "NakedURL":
await editor.openUrl(patchUrl(mdTree.children![0].text!));
break;