Are there syntax tree utils for the following to convert back from tree to the source content? #98
-
Hi! In my current
I thought it might be cool to convert to other file formats, if the ecosystem supports it. This would be done with simple a few other steps:
I notice such utils exist for Just wondering if there are any plans to ship this officially within the ecosystem, or any direction pointing to implementing this would be great. I'm getting excited thinking about how file conversion can be easily done through the unified ecosystem, and look forward to any guidance here! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
what utilities to or from these formats are you looking for? specifically https://github.com/syntax-tree/xast-util-to-xml and https://github.com/remarkjs/remark/tree/main/packages/remark-stringify, which stringify their respective ASTs back to text. |
Beta Was this translation helpful? Give feedback.
what utilities to or from these formats are you looking for?
There are many utils for both: https://github.com/syntax-tree?q=mdast and https://github.com/syntax-tree?q=xast, one may already suit your needs.
specifically https://github.com/syntax-tree/xast-util-to-xml and https://github.com/remarkjs/remark/tree/main/packages/remark-stringify, which stringify their respective ASTs back to text.