plone / blocks-conversion-tool

A tool to convert HTML (as used in Plone Classic) to Blocks (as used on Volto)
7 stars 5 forks source link

Refactor slate parser #4

Closed sneridagh closed 2 years ago

sneridagh commented 2 years ago

So, this is a total refactor of the slate deserialiser, based on the work that @tiberiuichim and I did some time ago.

Turns out that the approach in mapping and generating tags (and dealing with whitespace) in the current version is quite old and outdated.

It needs more love and, probably tests. It's based also on some code that EEA had here and there.

sneridagh commented 2 years ago

LGTM, however beware, it might be dragons in there. We need more tests for a variety of combos (like @pbauer h2 one), and the resultant htm might not match the previous implementation (specially with whitespace handling).

On the other side, this implementation will be far more robust.

ericof commented 2 years ago

@sneridagh I think this could be the start of the 1.0.0 release. We first release some alphas, add more test cases and then go for it.

erral commented 2 years ago

we are right now in the process of migrating a Plone 4 site to Volto. We will be testing both the released version of the conversion tool and also the one created with this PR. We can provide feedback with examples

ericof commented 2 years ago

Slate added support for