Fixes #62
This commit is contained in:
parent
9cf5984319
commit
ff24358269
@ -1,5 +1,6 @@
|
|||||||
import type { ClickEvent } from "@silverbulletmd/web/app_event";
|
import type { ClickEvent } from "@silverbulletmd/web/app_event";
|
||||||
import {
|
import {
|
||||||
|
flashNotification,
|
||||||
getCursor,
|
getCursor,
|
||||||
getText,
|
getText,
|
||||||
navigate as navigateTo,
|
navigate as navigateTo,
|
||||||
@ -28,7 +29,11 @@ async function actionClickOrActionEnter(mdTree: ParseTree | null) {
|
|||||||
await openUrl(mdTree.children![0].text!);
|
await openUrl(mdTree.children![0].text!);
|
||||||
break;
|
break;
|
||||||
case "Link":
|
case "Link":
|
||||||
await openUrl(mdTree.children![4].children![0].text!);
|
const url = mdTree.children![4].children![0].text!;
|
||||||
|
if (url.length <= 1) {
|
||||||
|
return flashNotification("Empty link, ignoring", "error");
|
||||||
|
}
|
||||||
|
await openUrl(url);
|
||||||
break;
|
break;
|
||||||
case "CommandLink":
|
case "CommandLink":
|
||||||
let command = mdTree
|
let command = mdTree
|
||||||
|
Loading…
Reference in New Issue
Block a user