Skip to content

Are there syntax tree utils for the following to convert back from tree to the source content? #98

Answered by ChristianMurphy
chrisrzhou asked this question in Q&A
Discussion options

You must be logged in to vote

but not for mdast, xast

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.

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@wooorm
Comment options

@chrisrzhou
Comment options

@wooorm
Comment options

@chrisrzhou
Comment options

@wooorm
Comment options

Answer selected by chrisrzhou
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants