diff --git a/plugs/core/navigate.ts b/plugs/core/navigate.ts index b6f54b3..3739816 100644 --- a/plugs/core/navigate.ts +++ b/plugs/core/navigate.ts @@ -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) { diff --git a/web/styles/theme.scss b/web/styles/theme.scss index 131eb50..8c53464 100644 --- a/web/styles/theme.scss +++ b/web/styles/theme.scss @@ -470,7 +470,7 @@ sb-admonition-warning .sb-admonition-icon { padding-right: 7px; } -.sb-link { +.sb-link:not(.sb-url) { cursor: pointer; }