Skip to content

semantic-dom-diff #46

Oct 13, 2020 · 1 comments · 5 replies
Discussion options

You must be logged in to vote

There was some experimental work on diffing done here: https://github.com/syntax-tree/unist-diff
Still in an early phase, but something you may be able to continue/build on if your interested in going a more generalized AST route.

To get clean dom-diffing I need tags and attributes to be printed on individual lines
question: should I create a fork of hast-util-to-html to get the output I need or do you think there are some resonable options that could be added to rehype-stringify/hast-util-to-html?

I'd defer to @wooorm, I believe https://github.com/syntax-tree/hast-util-to-html/blob/46dbdd85314942221d843e24190b5a78466a0753/lib/element.js#L123-L135 would be the segment of code that would…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@Hypercubed
Comment options

@wooorm
Comment options

@Hypercubed
Comment options

@wooorm
Comment options

@Hypercubed
Comment options

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