Skip to content
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

Allow rendering markdown::mdast::Node directly to HTML #156

Closed
wiktor-k opened this issue Nov 6, 2024 · 4 comments
Closed

Allow rendering markdown::mdast::Node directly to HTML #156

wiktor-k opened this issue Nov 6, 2024 · 4 comments

Comments

@wiktor-k
Copy link

wiktor-k commented Nov 6, 2024

Hi,

I just found your library and it's working really well! Thanks! 👏

I'm using markdown::to_mdast to get the AST for some frontmatter parameters and then using markdown::to_html_with_options for rendering and if I'm not mistaken this parses the content twice.

I think it'd be good to expose converting AST tree to HTML directly so I could parse it just once with to_mdast and then convert to HTML from that.

Thanks for your time! 👋

@ChristianMurphy
Copy link
Collaborator

Welcome @wiktor-k it sounds like you want to do some transformation on content?
If so see #32

Or if you mostly want AST nodes for another reason see #27

@wiktor-k
Copy link
Author

wiktor-k commented Nov 6, 2024

Ack. I'm not familiar with the lingo so I'm not sure if "hast" refers to HTML AST or something but if you think the issue is already resolved by others I'm OK with closing this one as a duplicate.

👋

@ChristianMurphy
Copy link
Collaborator

HAST is indeed HTML AST

@wooorm
Copy link
Owner

wooorm commented Nov 7, 2024

This indeed seems a duplicate, so closing!

Duplicate of #27

@wooorm wooorm closed this as not planned Won't fix, can't repro, duplicate, stale Nov 7, 2024
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

No branches or pull requests

3 participants