hanford / remark-slate

Remark plugin to compile Markdown as a slate 0.50+ compatible object.
155 stars 42 forks source link

Update deserialize to use a flatMap instead of map #53

Closed dylans closed 2 years ago

dylans commented 2 years ago

Switching from a map to a flatMap makes it possible to provide an array of elements instead of a single element for the return of the switch statement. This is useful if you want to add an empty text element before/after an image element, or replace a simple node with a more complex tree.

hanford commented 2 years ago

Thanks! Live in remark-slate@1.8.3