1
0
This commit is contained in:
Zef Hemel 2022-12-19 13:16:22 +01:00
parent b5120f9b12
commit 6444824f5c
2 changed files with 6 additions and 5 deletions

View File

@ -23,9 +23,10 @@ async function actionClickOrActionEnter(
return;
}
const navigationNodeFinder = (t: ParseTree) =>
["WikiLink", "Link", "URL", "NakedURL", "Link", "CommandLink"].includes(
t.type!,
);
["WikiLink", "Link", "Image", "URL", "NakedURL", "Link", "CommandLink"]
.includes(
t.type!,
);
if (!navigationNodeFinder(mdTree)) {
mdTree = findParentMatching(mdTree, navigationNodeFinder);
if (!mdTree) {
@ -48,10 +49,10 @@ async function actionClickOrActionEnter(
await editor.navigate(pageLink, pos, false, inNewWindow);
break;
}
case "URL":
case "NakedURL":
await editor.openUrl(patchUrl(mdTree.children![0].text!));
break;
case "Image":
case "Link": {
const url = patchUrl(mdTree.children![4].children![0].text!);
if (url.length <= 1) {

View File

@ -470,7 +470,7 @@ sb-admonition-warning .sb-admonition-icon {
padding-right: 7px;
}
.sb-link {
.sb-link:not(.sb-url) {
cursor: pointer;
}