1
0
silverbullet/plugins/core/link_navigate.ts

9 lines
272 B
TypeScript
Raw Normal View History

2022-02-24 16:24:49 +00:00
import { syscall } from "./lib/syscall.ts";
2022-02-26 12:26:31 +00:00
export async function linkNavigate() {
2022-02-24 16:24:49 +00:00
let syntaxNode = await syscall("editor.getSyntaxNodeUnderCursor");
if (syntaxNode && syntaxNode.name === "WikiLinkPage") {
await syscall("editor.navigate", syntaxNode.text);
}
}