Closed Hypercubed closed 5 years ago
Here are relevant tests in hast-util-to-html
: https://github.com/syntax-tree/hast-util-to-html/blob/master/test/attribute.js#L512
Thanks for the heads up! Fixed in https://github.com/syntax-tree/hast-util-to-dom/commit/f1f7d324df30c3ff6a2ddcc3cfaf387d87627b62
Looks like
rehype-stringify
andrehype-dom-stringify
handle element attributes inconsistently. Looks to me that Rehype converts attributes with hyphens (i.e.data-test
) to camel case (dataTest
).rehype-stringify
handles this correctly when generating the string but looks to me likerehype-dom-stringify
is not.See here: https://repl.it/@Hypercubed/GrubbySneakyBlogclient