Improve wiki link markdown preview
parent
b273645bae
commit
b043ffaee0
|
@ -226,7 +226,7 @@ function render(
|
||||||
case "WikiLink": {
|
case "WikiLink": {
|
||||||
// console.log("WikiLink", JSON.stringify(t, null, 2));
|
// console.log("WikiLink", JSON.stringify(t, null, 2));
|
||||||
const ref = findNodeOfType(t, "WikiLinkPage")!.children![0].text!;
|
const ref = findNodeOfType(t, "WikiLinkPage")!.children![0].text!;
|
||||||
let linkText = ref;
|
let linkText = ref.split("/").pop()!;
|
||||||
const aliasNode = findNodeOfType(t, "WikiLinkAlias");
|
const aliasNode = findNodeOfType(t, "WikiLinkAlias");
|
||||||
if (aliasNode) {
|
if (aliasNode) {
|
||||||
linkText = aliasNode.children![0].text!;
|
linkText = aliasNode.children![0].text!;
|
||||||
|
|
Loading…
Reference in New Issue