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);
|
|
|
|
}
|
|
|
|
}
|