Fix BustUpInlinesAtRangeEndpoints so it does not create empty spans

NEW
Unassigned

Status

()

Core
Editor
2 years ago
2 years ago

People

(Reporter: Jorg K (GMT+2), Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(firefox44 affected)

Details

(Reporter)

Description

2 years ago
While working on bug 772796, I noticed that BustUpInlinesAtRangeEndpoints sometimes creates empty spans.

This can be seen in test cases 44 and 45 of that bug here:
http://mxr.mozilla.org/mozilla-central/source/editor/libeditor/tests/test_bug772796.html?force=1#102

The expected result of the text is:
<div>test<span class="pre">foobar</span><br>
<span class="pre"></span></div> <--- empty span created here.
<span class="pre">baz</span>
You need to log in before you can comment on or make changes to this bug.