|
|
@@ -172,16 +172,21 @@ describe( 'Range', () => {
|
|
|
.to.equal( '<p>foo<b>[<img></img>]</b>bom</p>' );
|
|
|
} );
|
|
|
|
|
|
+ // Other results may theoretically be correct too. It is not decided whether the trimmed range should
|
|
|
+ // be collapsed in attribute element, at its start or its end. This is one of possible correct results
|
|
|
+ // and we won't know for sure unless we have more cases. See #1058.
|
|
|
it( 'case 8', () => {
|
|
|
expect( trim( '<p>[<b></b>]</p>' ) )
|
|
|
.to.equal( '<p><b></b>[]</p>' );
|
|
|
} );
|
|
|
|
|
|
+ // As above.
|
|
|
it( 'case 9', () => {
|
|
|
expect( trim( '<p><b></b>[<b></b>]<b></b></p>' ) )
|
|
|
.to.equal( '<p><b></b><b></b>[]<b></b></p>' );
|
|
|
} );
|
|
|
|
|
|
+ // As above.
|
|
|
it( 'case 10', () => {
|
|
|
expect( trim( '<p>[<b></b><b></b>]</p>' ) )
|
|
|
.to.equal( '<p><b></b><b></b>[]</p>' );
|