sanity-io / block-content-to-html

Deprecated in favor of @portabletext/to-html
MIT License
20 stars 2 forks source link

Parent container depends on children node count #7

Closed intensr closed 4 years ago

intensr commented 4 years ago

It seems that the block container only "spawns" if you have more than one child node (which is smart in terms of automatic removal of redundancy). Anyway it would be cool to have the opportunity to have an option to overrule the default behaviour even if there is just one child node. In my case I use this container to set the specific styles. If the container gets removed I loose all the stylings. Ofc there are other ways around that, but I feel that it is inconsistent/controlled via content.

aaadotpm commented 3 years ago

Did you ever end up getting around this? Would be great to hear… This is a fairly annoying feature/bug when it comes to consistency.

intensr commented 3 years ago

actually i switched to https://github.com/sanity-io/block-content-to-react where this functionality is available somehow