tommoor / slate-md-serializer

A Markdown serializer for the Slate editor framework
MIT License
64 stars 36 forks source link

Table blocks should be surrounded by newline characters #39

Closed olipo186 closed 4 years ago

olipo186 commented 4 years ago

This PR changes the way that tables are serialized to Markdown by wrapping them with newline characters. A slight modification was made to how markdown is parsed into nodes, to avoid that these wrapping new lines are interpreted as "blank line paragraphs".

The change takes backwards compatibility into account, in the way that both tables in the old syntax (without wrapping newline) and the new syntax (with wrapping newline) will be parsed correctly.

Therefore this change should not break existing markdown documents that was created using the old version of slate-md-serializer.

Edit: This fixes the issue described here: https://github.com/tommoor/slate-md-serializer/issues/38