Compatible Astro 5.9 new API renderMarkdown#3241
Compatible Astro 5.9 new API renderMarkdown#3241sgalcheung wants to merge 3 commits intowithastro:mainfrom
Conversation
|
✅ Deploy Preview for astro-starlight ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Thanks for the contribution. I hope you won't mind, I converted your PR to a draft. I did not immediately notice your message at the end of the PR, thought it was ready for a review and got confused about why only tests were updated. Make sure to switch it back to ready for review when needed 👍 |
…ngs for remote markdown content
|
I have an idea to support both local files and remote content. I think retrieving pageLang from the page’s LanguageSelect changed event is a better approach. Maybe we can read URL routing instead of file routing. @delucis @HiDeoo But this seems impossible to get the page route in the Vite context. |
|
I did not have the time yet to take a close look at the issue, so I'm only guessing here but I assume the issue is related to the new Again, still guessing here without having looked in detail into the issue, but I assume this could be a 2-step fixes:
We are definitely in a different context when running such remark/rehype plugins so that would not be possible. |
|
So, should I create another PR to temporarily skip rendering remote content in the next version? |
|
This PR seems fine to address the linked issue at the moment I think 👍 |
|
Fine, I changed this PR title, because it just skips the remote content, so the new API doesn't "support" it yet! |
|
Thanks again for the PR @sgalcheung — going to close this in favour of #3274 which will also fix this with a slightly different approach. |




Description
Create a
createMarkdownTestHelpermethod to reduce repeated creation of createMarkdownProcessor, and this method could initialize different parameters in the test method, so we get all tests passed!before

after

Next, I will create a test to reproduce this bug, so that we can better verify the modified code logic.Add a test(should correctly autolink headings in remote markdown content using rehypeAutolinkHeadings) to reproduce this bug