(Draft/Proof of concept) Render markdown to Dioxus nodes using ASTs #10
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Warning
This PR is not ready to merge as-is. It is still a draft/proof-of-concept.
This PR is a proof-of-concept which changes the rendering method for the library. Instead of rendering directly (and dangerously) to HTML, this PR renders Markdown to an abstract syntax tree (AST), and then renders those into Dioxus Nodes.
To accomplish that, the underlying markdown parser was switched to markdown-rs, which is a pure rust markdown parser that supports rendering to an AST (mdast), and also seems to be a stable library.
Demo
For demonstration purposes, here is a screenshot of the example program:
TODO
This is still mostly an experimental proof of concept I built while prototyping something else. I am submitting this PR to gather feedback on the overall approach, and inquire if there is desire/interest in this approach.
Here are things that are still to be done:
Please let me know if there interest in this approach, or any feedback in general. Thank you!