Changelog
This commit is contained in:
+21
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user