Note: I originally posted this as a Re-Mirror issue but was re-directed here.
I'm dealing with some HTML created by a legacy rich text editor. This editor sometimes seems to have produced some unnecessary - albeit valid - nesting, which is not getting parsed correctly.
Steps to reproduce
Given a Remirror instance with
stringHandler: 'html'
TextSizeExtension
and the following HTML content
<!-- Input -->
<p>
<span style="font-size: 18px;">
Text in 18px
<span style="font-size: 24px;">
Text in 24px
<span style="font-size: 18px;"><!-- this is sanitised, even though it's a valid new font-size -->
Text in 18px
<span style="font-size: 24px;"><!-- this is sanitised, but not noticeable in the end result because the parent 18px is sanitised -->
Text in 24px
</span>
</span>
</span>
</span>
</p>
This results in the following rendered HTML (Notice that the text in the red box should also have a font-size of 18px)
It also seems to be scoped to font-size. If I instead replace the font-size style with, say, font-weight in a similar fashion it renders as expected.
Note: I originally posted this as a Re-Mirror issue but was re-directed here.
I'm dealing with some HTML created by a legacy rich text editor. This editor sometimes seems to have produced some unnecessary - albeit valid - nesting, which is not getting parsed correctly.
Steps to reproduce
Given a Remirror instance with
This results in the following rendered HTML (Notice that the text in the red box should also have a font-size of 18px)
It also seems to be scoped to font-size. If I instead replace the font-size style with, say, font-weight in a similar fashion it renders as expected.