Improve wiki link markdown preview

pull/513/head
Zef Hemel 2023-08-17 20:37:55 +02:00
parent b273645bae
commit b043ffaee0
1 changed files with 1 additions and 1 deletions

View File

@ -226,7 +226,7 @@ function render(
case "WikiLink": {
// console.log("WikiLink", JSON.stringify(t, null, 2));
const ref = findNodeOfType(t, "WikiLinkPage")!.children![0].text!;
let linkText = ref;
let linkText = ref.split("/").pop()!;
const aliasNode = findNodeOfType(t, "WikiLinkAlias");
if (aliasNode) {
linkText = aliasNode.children![0].text!;