Skip to content

feat: add rendererRenderAsync #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 5, 2025
Merged

Conversation

s-light
Copy link
Contributor

@s-light s-light commented Mar 4, 2025

Description

allow for renderer.render access in the async way.

Linked Issues

fixes #3

Additional context

i have no experience in ts - so please review my code carefully!!
(i tried my best)

@antfu antfu merged commit d69e353 into antfu:main Mar 5, 2025
4 checks passed
@s-light
Copy link
Contributor Author

s-light commented Mar 5, 2025

wow thanks @antfu !

@s-light s-light deleted the feat_rendererRenderAsync branch March 5, 2025 06:08
@antfu
Copy link
Owner

antfu commented Mar 7, 2025

Hey @s-light, I think I have to revert this right now. As you mentioned in
mdit-vue/mdit-vue#13, this breaks the plugins that replace render and causes unplugin/unplugin-vue-markdown#63 CI to fail. This will break the existing usages, so we can't ship this without a proper workaround.

antfu added a commit that referenced this pull request Mar 7, 2025
@s-light
Copy link
Contributor Author

s-light commented Mar 8, 2025

yeah sorry for the work..

if mdit-vue/mdit-vue#13 is fixed - do you think it is fine then?
or are we locked-in with the possibility that other plugins replacing render ?

@antfu
Copy link
Owner

antfu commented Mar 9, 2025

Yeah I think we should still support custom render function. To support your case, I think we should reuse our handling but not cascading them to support both cases

@s-light
Copy link
Contributor Author

s-light commented Apr 10, 2025

mdit-vue #13 is now fixed.

but if i understand you correct you think that we need to find another way to handle this?
as other plugins otherwise again fail?!
we could do this in the way that the special behavior is only used when the tokens option is set.
this way it is fine for existing users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

allow custom async *magic* between parse & render
2 participants