Open windily-cloud opened 10 months ago
This issue might be caused by the version 2.0 of mdast-util-from-markdown. https://github.com/syntax-tree/mdast-util-from-markdown/commit/18f4bb0f1b720fd30f1c3a7b11e1fac90aa6903f
I also started experiencing this issue in my Astro site after upgrading from Astro 3 -> 4. According to their docs, it looks like they upgraded the following packages:
Potentially this is an error with this package not being compatible with the latest version of one or more of these dependencies?
Since this.exit
no longer has a return value, I made the following modifications in my self-maintained version. Currently, it works in my use case, but it is unclear if there are any other issues. Can someone raise a PR to fix this issue?
fromMarkdown.ts#L76C3-L76C3
const wikiLink = top(this.stack)
const {
data: {isEmbed, target, alias},
} = wikiLink;
this.exit(token);
I am also experiencing this issue! I'll try out @yuhangch's solution against my use case, but I'm also unsure if I will be able to to put up a PR.
Add @yuhangch 's modification to exitWikiLink
function in remark-wiki-link/dist/index.js
works! 👍
I can also confirm that @yuhangch's solution works on local with Astro.
const wikiLink = top(this.stack) const { data: {isEmbed, target, alias}, } = wikiLink; this.exit(token);
Now I think if I patch-package this change or wait for an official update to the repo 😆
I really love this project so much. This is awesome work!!!
But i have some issue:
I try to log, wikilink is undefined:
Then i go to see the
exit
function:In the remark-wiki-link package, I found that my code were giving me errors, and after checking that wikilink was returning undefined, I returned the node, and it worked. I don't know if this is a problem, or if something is wrong. I'm not sure if this is a problem or what's wrong.
Thx for any reply!