block-content-to-react icon indicating copy to clipboard operation
block-content-to-react copied to clipboard

Blocks that has _type different from "block" doesn't get correct list processing

Open fabien opened this issue 3 years ago • 1 comments

Cross-posting because it probably originates here: https://github.com/sanity-io/next-sanity/issues/20

fabien avatar Jun 07 '21 09:06 fabien

Thanks for the report!

From this library's point of view it's correct that you'll have manually declare block.content to use the built-in block serializer. It's definitely a bug that this causes list items to not be processed correctly. I'm renaming this issue to reflect that.

I think this might be the problem: https://github.com/sanity-io/block-content-to-hyperscript/blob/a03e7f496d6faa68ce1b16e7031d2d47cb65aeb2/src/blocksToNodes.js#L109-L111.

judofyr avatar Jul 01 '21 08:07 judofyr

Closing this, as the new @portabletext/react library is the successor to this module. Please see https://github.com/portabletext/react-portabletext

rexxars avatar Jan 31 '23 01:01 rexxars