parent
b5120f9b12
commit
6444824f5c
@ -23,7 +23,8 @@ async function actionClickOrActionEnter(
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const navigationNodeFinder = (t: ParseTree) =>
|
const navigationNodeFinder = (t: ParseTree) =>
|
||||||
["WikiLink", "Link", "URL", "NakedURL", "Link", "CommandLink"].includes(
|
["WikiLink", "Link", "Image", "URL", "NakedURL", "Link", "CommandLink"]
|
||||||
|
.includes(
|
||||||
t.type!,
|
t.type!,
|
||||||
);
|
);
|
||||||
if (!navigationNodeFinder(mdTree)) {
|
if (!navigationNodeFinder(mdTree)) {
|
||||||
@ -48,10 +49,10 @@ async function actionClickOrActionEnter(
|
|||||||
await editor.navigate(pageLink, pos, false, inNewWindow);
|
await editor.navigate(pageLink, pos, false, inNewWindow);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "URL":
|
|
||||||
case "NakedURL":
|
case "NakedURL":
|
||||||
await editor.openUrl(patchUrl(mdTree.children![0].text!));
|
await editor.openUrl(patchUrl(mdTree.children![0].text!));
|
||||||
break;
|
break;
|
||||||
|
case "Image":
|
||||||
case "Link": {
|
case "Link": {
|
||||||
const url = patchUrl(mdTree.children![4].children![0].text!);
|
const url = patchUrl(mdTree.children![4].children![0].text!);
|
||||||
if (url.length <= 1) {
|
if (url.length <= 1) {
|
||||||
|
@ -470,7 +470,7 @@ sb-admonition-warning .sb-admonition-icon {
|
|||||||
padding-right: 7px;
|
padding-right: 7px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sb-link {
|
.sb-link:not(.sb-url) {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user