sanity-io / block-content-to-hyperscript

Function for transforming Sanity block content to HyperScript
MIT License
17 stars 8 forks source link

Option to ignore uknown block types with overridable serializer #13

Closed skogsmaskin closed 3 years ago

skogsmaskin commented 4 years ago

It's a common issue that unknown block types breaks the frontend. This makes it fail safe (if you want).

It can be discussed if marks should follow the same pattern, or we should just do as we do today (output a span for them with a console warn).

skogsmaskin commented 4 years ago

Hah...at least it was consistent ;) Force pushed fix.

kmelve commented 4 years ago

Could we inverse this, and rather add errorUnknownTypes? People keep stumbling on the current error behavior.

rexxars commented 4 years ago

I'm fine with changing the default to not throw.

barbogast commented 4 years ago

@rexxars Would it be possible to get this PR merged? 🙏

balazsorban44 commented 3 years ago

@rexxars Anything holding this back still? :)

This fixes #17