You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
<p>This is begin text:</p><p><br></p><ul><li><strong>Bold text</strong> and regular text</li><li>Another bullet</li></ul><p>Another text after list</p>
But the result is this:
<p>This is begin text:</p><p><br></p><p><ul><li><strong>Bold text</strong> and regular text</li><li>Another bullet</li></ul>Another text after list</p>
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:
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.The text was updated successfully, but these errors were encountered: