Closed StarpTech closed 6 years ago
That would be something for hast-util-to-html
, somewhere around here, which is used by rehype-stringify. I don’t think it would be easy though, to infer how deep an element is nested and when to start breaking: I’m sure <my-component disabled></my-component>
could be on one line?
Also, rehype is for HTML, and I’m pretty sure all the []
s and ()
s won’t work well!
Thanks for the fast response. I will take a look.
I’m sure
could be on one line?
Yeah, based on the property count or max width.
Also, rehype is for HTML, and I’m pretty sure all the []s and ()s won’t work well!
With rehype-format it works.
Hi, is there an easy way to ident attributes in the same way as with tags? I want to archive something like this but I didn't find a ad-hoc solution to change the way how attributes are rendered. Do I need an own renderer or can it be archived with existing tools? Thank you.
Input:
Output: