Closed shuedo closed 7 months ago
thanks for the report. i will create a Pull Request.
(@shuedo maybe you like to create a pull request, would be welcome.)
(@shuedo maybe you like to create a pull request, would be welcome.)
Ok thanks! I will create it.
Describe the bug When a list that contains text with attribute bold (it may happen with other kind of inline attributes) has a previous linebreak, the next paragraph after the list breaks.
The delta code which generates the Problem
This is the delta code that fails:
The expected html output the delta should produce
It should produce this:
But the result is this:
Notice the additional
<p>
tag before the<ul>
, which breaks the HTML structure.Additional context Upon investigating the Text.render function, it appears that the issue stems from this conditional statement:
In cases where there is a line break, the variable $next contains the line text
<strong>Bold text</strong>
, which is inline but also marked as "Done." Consequently, an opening<p>
tag is generated due to the fulfillment of the if condition, but it fails to close properly because the line is marked as "Done."Proposed solution:
Updating the condition to the following resolves the issue:
This adjustment ensures that the
<p>
tag is only opened when the next line is not marked as "Done," effectively resolving the problem.