parent
b5120f9b12
commit
6444824f5c
@ -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) {
|
||||
|
@ -470,7 +470,7 @@ sb-admonition-warning .sb-admonition-icon {
|
||||
padding-right: 7px;
|
||||
}
|
||||
|
||||
.sb-link {
|
||||
.sb-link:not(.sb-url) {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user