(Draft/Proof of concept) Render markdown to Dioxus nodes using ASTs#10
Draft
danieldaquino wants to merge 1 commit intoDioxusLabs:masterfrom
Draft
(Draft/Proof of concept) Render markdown to Dioxus nodes using ASTs#10danieldaquino wants to merge 1 commit intoDioxusLabs:masterfrom
danieldaquino wants to merge 1 commit intoDioxusLabs:masterfrom
Conversation
This commit is a proof-of-concept which changes the strategy from rendering directly to HTML to rendering markdown to an abstract syntax tree, and then render those to Dioxus nodes.
|
Curious if this is still being worked on. |
Author
@dipanshuhappy, I am not currently working on this at the moment. The draft is somewhat functional though, please feel free to use it. I will likely come back to this at some point, but I don't have any definite plans on it yet. |
I see, maybe you can also use this as inspiration |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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!