mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 17:55:07 +02:00
While editing, we need to consider whether removing a <br> has any effect on layout to determine whether its extraneous. This new condition finds most cases for extraneous <br>s inside block elements.
19 lines
397 B
Plaintext
19 lines
397 B
Plaintext
--- a ---
|
||
Before: foobar
|
||
After: fobar
|
||
--- b ---
|
||
Before: foo👩🏼❤️👨🏻bar
|
||
After: foobar
|
||
--- c ---
|
||
Before: foo<div contenteditable="">bar</div>
|
||
After: foobar
|
||
--- d ---
|
||
Before: foo<br><br><div>bar<br>baz</div>
|
||
After: foo<br><div>bar<br>baz</div>
|
||
--- e ---
|
||
Before: <p>foo</p><br><p>bar</p>
|
||
After: <p>foo</p><p>bar</p>
|
||
--- f ---
|
||
Before: <p><span>abc</span><br></p>
|
||
After: <p><br></p>
|