|
@@ -918,8 +918,12 @@ describe( 'Range', () => {
|
|
|
} );
|
|
} );
|
|
|
|
|
|
|
|
describe( 'by SplitDelta', () => {
|
|
describe( 'by SplitDelta', () => {
|
|
|
- it( 'split inside range', () => {
|
|
|
|
|
|
|
+ beforeEach( () => {
|
|
|
|
|
+ // Cleaning...
|
|
|
root.removeChildren( root.childCount );
|
|
root.removeChildren( root.childCount );
|
|
|
|
|
+ } );
|
|
|
|
|
+
|
|
|
|
|
+ it( 'split inside range', () => {
|
|
|
root.appendChildren( new Element( 'p', null, new Text( 'foobar' ) ) );
|
|
root.appendChildren( new Element( 'p', null, new Text( 'foobar' ) ) );
|
|
|
|
|
|
|
|
range.start = new Position( root, [ 0, 2 ] );
|
|
range.start = new Position( root, [ 0, 2 ] );
|
|
@@ -934,178 +938,193 @@ describe( 'Range', () => {
|
|
|
expect( transformed[ 0 ].end.path ).to.deep.equal( [ 1, 1 ] );
|
|
expect( transformed[ 0 ].end.path ).to.deep.equal( [ 1, 1 ] );
|
|
|
} );
|
|
} );
|
|
|
|
|
|
|
|
- describe( 'by MergeDelta', () => {
|
|
|
|
|
- it( 'merge element with collapsed range', () => {
|
|
|
|
|
- root.removeChildren( root.childCount );
|
|
|
|
|
- root.appendChildren( [ new Element( 'p', null, new Text( 'foo' ) ), new Element( 'p', null, new Text( 'bar' ) ) ] );
|
|
|
|
|
|
|
+ it( 'split inside range which end is at the end of split element', () => {
|
|
|
|
|
+ root.appendChildren( new Element( 'p', null, new Text( 'foobar' ) ) );
|
|
|
|
|
+
|
|
|
|
|
+ range.start = new Position( root, [ 0, 3 ] );
|
|
|
|
|
+ range.end = new Position( root, [ 0, 6 ] );
|
|
|
|
|
+
|
|
|
|
|
+ const delta = getSplitDelta( new Position( root, [ 0, 4 ] ), new Element( 'p' ), 2, 1 );
|
|
|
|
|
+
|
|
|
|
|
+ const transformed = range.getTransformedByDelta( delta );
|
|
|
|
|
+
|
|
|
|
|
+ expect( transformed.length ).to.equal( 1 );
|
|
|
|
|
+ expect( transformed[ 0 ].start.path ).to.deep.equal( [ 0, 3 ] );
|
|
|
|
|
+ expect( transformed[ 0 ].end.path ).to.deep.equal( [ 1, 2 ] );
|
|
|
|
|
+ } );
|
|
|
|
|
+ } );
|
|
|
|
|
+
|
|
|
|
|
+ describe( 'by MergeDelta', () => {
|
|
|
|
|
+ it( 'merge element with collapsed range', () => {
|
|
|
|
|
+ root.removeChildren( root.childCount );
|
|
|
|
|
+ root.appendChildren( [ new Element( 'p', null, new Text( 'foo' ) ), new Element( 'p', null, new Text( 'bar' ) ) ] );
|
|
|
|
|
|
|
|
- range.start = new Position( root, [ 1, 0 ] );
|
|
|
|
|
- range.end = new Position( root, [ 1, 0 ] );
|
|
|
|
|
|
|
+ range.start = new Position( root, [ 1, 0 ] );
|
|
|
|
|
+ range.end = new Position( root, [ 1, 0 ] );
|
|
|
|
|
|
|
|
- const delta = getMergeDelta( new Position( root, [ 1 ] ), 3, 3, 1 );
|
|
|
|
|
|
|
+ const delta = getMergeDelta( new Position( root, [ 1 ] ), 3, 3, 1 );
|
|
|
|
|
|
|
|
- const transformed = range.getTransformedByDelta( delta );
|
|
|
|
|
|
|
+ const transformed = range.getTransformedByDelta( delta );
|
|
|
|
|
|
|
|
- expect( transformed.length ).to.equal( 1 );
|
|
|
|
|
- expect( transformed[ 0 ].start.path ).to.deep.equal( [ 0, 3 ] );
|
|
|
|
|
- expect( transformed[ 0 ].end.path ).to.deep.equal( [ 0, 3 ] );
|
|
|
|
|
- } );
|
|
|
|
|
|
|
+ expect( transformed.length ).to.equal( 1 );
|
|
|
|
|
+ expect( transformed[ 0 ].start.path ).to.deep.equal( [ 0, 3 ] );
|
|
|
|
|
+ expect( transformed[ 0 ].end.path ).to.deep.equal( [ 0, 3 ] );
|
|
|
|
|
+ } );
|
|
|
|
|
|
|
|
- // #877.
|
|
|
|
|
- it( 'merge elements that contain elements with range boundaries', () => {
|
|
|
|
|
- // Initial state:
|
|
|
|
|
- // <w><p>x[x</p></w><w><p>y]y</p></w>
|
|
|
|
|
- // Expected state after merge:
|
|
|
|
|
- // <w><p>x[x</p><p>y]y</p></w>
|
|
|
|
|
|
|
+ // #877.
|
|
|
|
|
+ it( 'merge elements that contain elements with range boundaries', () => {
|
|
|
|
|
+ // Initial state:
|
|
|
|
|
+ // <w><p>x[x</p></w><w><p>y]y</p></w>
|
|
|
|
|
+ // Expected state after merge:
|
|
|
|
|
+ // <w><p>x[x</p><p>y]y</p></w>
|
|
|
|
|
|
|
|
- const range = new Range( new Position( root, [ 0, 0, 1 ] ), new Position( root, [ 1, 0, 1 ] ) );
|
|
|
|
|
- const delta = getMergeDelta( new Position( root, [ 1 ] ), 1, 1, 1 );
|
|
|
|
|
|
|
+ const range = new Range( new Position( root, [ 0, 0, 1 ] ), new Position( root, [ 1, 0, 1 ] ) );
|
|
|
|
|
+ const delta = getMergeDelta( new Position( root, [ 1 ] ), 1, 1, 1 );
|
|
|
|
|
|
|
|
- const transformed = range.getTransformedByDelta( delta );
|
|
|
|
|
|
|
+ const transformed = range.getTransformedByDelta( delta );
|
|
|
|
|
|
|
|
- expect( transformed.length ).to.equal( 1 );
|
|
|
|
|
- expect( transformed[ 0 ].start.path ).to.deep.equal( [ 0, 0, 1 ] );
|
|
|
|
|
- expect( transformed[ 0 ].end.path ).to.deep.equal( [ 0, 1, 1 ] );
|
|
|
|
|
- } );
|
|
|
|
|
|
|
+ expect( transformed.length ).to.equal( 1 );
|
|
|
|
|
+ expect( transformed[ 0 ].start.path ).to.deep.equal( [ 0, 0, 1 ] );
|
|
|
|
|
+ expect( transformed[ 0 ].end.path ).to.deep.equal( [ 0, 1, 1 ] );
|
|
|
} );
|
|
} );
|
|
|
|
|
+ } );
|
|
|
|
|
|
|
|
- describe( 'by WrapDelta', () => {
|
|
|
|
|
- it( 'maintans start position when wrapping element in which the range starts and ends', () => {
|
|
|
|
|
- root.removeChildren( root.childCount );
|
|
|
|
|
- root.appendChildren( [ new Element( 'p', null, new Text( 'foo' ) ), new Element( 'p', null, new Text( 'bar' ) ) ] );
|
|
|
|
|
|
|
+ describe( 'by WrapDelta', () => {
|
|
|
|
|
+ it( 'maintans start position when wrapping element in which the range starts and ends', () => {
|
|
|
|
|
+ root.removeChildren( root.childCount );
|
|
|
|
|
+ root.appendChildren( [ new Element( 'p', null, new Text( 'foo' ) ), new Element( 'p', null, new Text( 'bar' ) ) ] );
|
|
|
|
|
|
|
|
- // <p>f[o]o</p><p>bar</p>
|
|
|
|
|
- range.start = new Position( root, [ 0, 1 ] );
|
|
|
|
|
- range.end = new Position( root, [ 0, 2 ] );
|
|
|
|
|
|
|
+ // <p>f[o]o</p><p>bar</p>
|
|
|
|
|
+ range.start = new Position( root, [ 0, 1 ] );
|
|
|
|
|
+ range.end = new Position( root, [ 0, 2 ] );
|
|
|
|
|
|
|
|
- const wrapRange = new Range( new Position( root, [ 0 ] ), new Position( root, [ 1 ] ) );
|
|
|
|
|
- const wrapElement = new Element( 'w' );
|
|
|
|
|
- const delta = getWrapDelta( wrapRange, wrapElement, 1 );
|
|
|
|
|
|
|
+ const wrapRange = new Range( new Position( root, [ 0 ] ), new Position( root, [ 1 ] ) );
|
|
|
|
|
+ const wrapElement = new Element( 'w' );
|
|
|
|
|
+ const delta = getWrapDelta( wrapRange, wrapElement, 1 );
|
|
|
|
|
|
|
|
- const transformed = range.getTransformedByDelta( delta );
|
|
|
|
|
|
|
+ const transformed = range.getTransformedByDelta( delta );
|
|
|
|
|
|
|
|
- // <w><p>f[o]o</p></w><p>bar</p>
|
|
|
|
|
- expect( transformed.length ).to.equal( 1 );
|
|
|
|
|
- expect( transformed[ 0 ].start.path ).to.deep.equal( [ 0, 0, 1 ] );
|
|
|
|
|
- expect( transformed[ 0 ].end.path ).to.deep.equal( [ 0, 0, 2 ] );
|
|
|
|
|
- } );
|
|
|
|
|
|
|
+ // <w><p>f[o]o</p></w><p>bar</p>
|
|
|
|
|
+ expect( transformed.length ).to.equal( 1 );
|
|
|
|
|
+ expect( transformed[ 0 ].start.path ).to.deep.equal( [ 0, 0, 1 ] );
|
|
|
|
|
+ expect( transformed[ 0 ].end.path ).to.deep.equal( [ 0, 0, 2 ] );
|
|
|
|
|
+ } );
|
|
|
|
|
|
|
|
- it( 'maintans start position when wrapping element in which the range starts but not ends', () => {
|
|
|
|
|
- root.removeChildren( root.childCount );
|
|
|
|
|
- root.appendChildren( [ new Element( 'p', null, new Text( 'foo' ) ), new Element( 'p', null, new Text( 'bar' ) ) ] );
|
|
|
|
|
|
|
+ it( 'maintans start position when wrapping element in which the range starts but not ends', () => {
|
|
|
|
|
+ root.removeChildren( root.childCount );
|
|
|
|
|
+ root.appendChildren( [ new Element( 'p', null, new Text( 'foo' ) ), new Element( 'p', null, new Text( 'bar' ) ) ] );
|
|
|
|
|
|
|
|
- // <p>f[oo</p><p>b]ar</p>
|
|
|
|
|
- range.start = new Position( root, [ 0, 1 ] );
|
|
|
|
|
- range.end = new Position( root, [ 1, 1 ] );
|
|
|
|
|
|
|
+ // <p>f[oo</p><p>b]ar</p>
|
|
|
|
|
+ range.start = new Position( root, [ 0, 1 ] );
|
|
|
|
|
+ range.end = new Position( root, [ 1, 1 ] );
|
|
|
|
|
|
|
|
- const wrapRange = new Range( new Position( root, [ 0 ] ), new Position( root, [ 1 ] ) );
|
|
|
|
|
- const wrapElement = new Element( 'w' );
|
|
|
|
|
- const delta = getWrapDelta( wrapRange, wrapElement, 1 );
|
|
|
|
|
|
|
+ const wrapRange = new Range( new Position( root, [ 0 ] ), new Position( root, [ 1 ] ) );
|
|
|
|
|
+ const wrapElement = new Element( 'w' );
|
|
|
|
|
+ const delta = getWrapDelta( wrapRange, wrapElement, 1 );
|
|
|
|
|
|
|
|
- const transformed = range.getTransformedByDelta( delta );
|
|
|
|
|
|
|
+ const transformed = range.getTransformedByDelta( delta );
|
|
|
|
|
|
|
|
- // <w><p>f[oo</p></w><p>b]ar</p>
|
|
|
|
|
- expect( transformed.length ).to.equal( 1 );
|
|
|
|
|
- expect( transformed[ 0 ].start.path ).to.deep.equal( [ 0, 0, 1 ] );
|
|
|
|
|
- expect( transformed[ 0 ].end.path ).to.deep.equal( [ 1, 1 ] );
|
|
|
|
|
- } );
|
|
|
|
|
|
|
+ // <w><p>f[oo</p></w><p>b]ar</p>
|
|
|
|
|
+ expect( transformed.length ).to.equal( 1 );
|
|
|
|
|
+ expect( transformed[ 0 ].start.path ).to.deep.equal( [ 0, 0, 1 ] );
|
|
|
|
|
+ expect( transformed[ 0 ].end.path ).to.deep.equal( [ 1, 1 ] );
|
|
|
|
|
+ } );
|
|
|
|
|
|
|
|
- it( 'maintans end position when wrapping element in which the range ends but not starts', () => {
|
|
|
|
|
- root.removeChildren( root.childCount );
|
|
|
|
|
- root.appendChildren( [ new Element( 'p', null, new Text( 'foo' ) ), new Element( 'p', null, new Text( 'bar' ) ) ] );
|
|
|
|
|
|
|
+ it( 'maintans end position when wrapping element in which the range ends but not starts', () => {
|
|
|
|
|
+ root.removeChildren( root.childCount );
|
|
|
|
|
+ root.appendChildren( [ new Element( 'p', null, new Text( 'foo' ) ), new Element( 'p', null, new Text( 'bar' ) ) ] );
|
|
|
|
|
|
|
|
- // <p>f[oo</p><p>b]ar</p>
|
|
|
|
|
- range.start = new Position( root, [ 0, 1 ] );
|
|
|
|
|
- range.end = new Position( root, [ 1, 1 ] );
|
|
|
|
|
|
|
+ // <p>f[oo</p><p>b]ar</p>
|
|
|
|
|
+ range.start = new Position( root, [ 0, 1 ] );
|
|
|
|
|
+ range.end = new Position( root, [ 1, 1 ] );
|
|
|
|
|
|
|
|
- const wrapRange = new Range( new Position( root, [ 1 ] ), new Position( root, [ 2 ] ) );
|
|
|
|
|
- const wrapElement = new Element( 'w' );
|
|
|
|
|
- const delta = getWrapDelta( wrapRange, wrapElement, 1 );
|
|
|
|
|
|
|
+ const wrapRange = new Range( new Position( root, [ 1 ] ), new Position( root, [ 2 ] ) );
|
|
|
|
|
+ const wrapElement = new Element( 'w' );
|
|
|
|
|
+ const delta = getWrapDelta( wrapRange, wrapElement, 1 );
|
|
|
|
|
|
|
|
- const transformed = range.getTransformedByDelta( delta );
|
|
|
|
|
|
|
+ const transformed = range.getTransformedByDelta( delta );
|
|
|
|
|
|
|
|
- // <p>f[oo</p><w><p>b]ar</p></w>
|
|
|
|
|
- expect( transformed.length ).to.equal( 1 );
|
|
|
|
|
- expect( transformed[ 0 ].start.path ).to.deep.equal( [ 0, 1 ] );
|
|
|
|
|
- expect( transformed[ 0 ].end.path ).to.deep.equal( [ 1, 0, 1 ] );
|
|
|
|
|
- } );
|
|
|
|
|
|
|
+ // <p>f[oo</p><w><p>b]ar</p></w>
|
|
|
|
|
+ expect( transformed.length ).to.equal( 1 );
|
|
|
|
|
+ expect( transformed[ 0 ].start.path ).to.deep.equal( [ 0, 1 ] );
|
|
|
|
|
+ expect( transformed[ 0 ].end.path ).to.deep.equal( [ 1, 0, 1 ] );
|
|
|
} );
|
|
} );
|
|
|
|
|
+ } );
|
|
|
|
|
|
|
|
- describe( 'by UnwrapDelta', () => {
|
|
|
|
|
- it( 'maintans start position when wrapping element in which the range starts and ends', () => {
|
|
|
|
|
- root.removeChildren( root.childCount );
|
|
|
|
|
- root.appendChildren( [
|
|
|
|
|
- new Element( 'w', null, [
|
|
|
|
|
- new Element( 'p', null, new Text( 'foo' ) )
|
|
|
|
|
- ] ),
|
|
|
|
|
- new Element( 'p', null, new Text( 'bar' ) )
|
|
|
|
|
- ] );
|
|
|
|
|
|
|
+ describe( 'by UnwrapDelta', () => {
|
|
|
|
|
+ it( 'maintans start position when wrapping element in which the range starts and ends', () => {
|
|
|
|
|
+ root.removeChildren( root.childCount );
|
|
|
|
|
+ root.appendChildren( [
|
|
|
|
|
+ new Element( 'w', null, [
|
|
|
|
|
+ new Element( 'p', null, new Text( 'foo' ) )
|
|
|
|
|
+ ] ),
|
|
|
|
|
+ new Element( 'p', null, new Text( 'bar' ) )
|
|
|
|
|
+ ] );
|
|
|
|
|
|
|
|
- // <w><p>f[o]o</p></w><p>bar</p>
|
|
|
|
|
- range.start = new Position( root, [ 0, 0, 1 ] );
|
|
|
|
|
- range.end = new Position( root, [ 0, 0, 2 ] );
|
|
|
|
|
|
|
+ // <w><p>f[o]o</p></w><p>bar</p>
|
|
|
|
|
+ range.start = new Position( root, [ 0, 0, 1 ] );
|
|
|
|
|
+ range.end = new Position( root, [ 0, 0, 2 ] );
|
|
|
|
|
|
|
|
- const unwrapPosition = new Position( root, [ 0 ] );
|
|
|
|
|
- const delta = getUnwrapDelta( unwrapPosition, 1, 1 );
|
|
|
|
|
|
|
+ const unwrapPosition = new Position( root, [ 0 ] );
|
|
|
|
|
+ const delta = getUnwrapDelta( unwrapPosition, 1, 1 );
|
|
|
|
|
|
|
|
- const transformed = range.getTransformedByDelta( delta );
|
|
|
|
|
|
|
+ const transformed = range.getTransformedByDelta( delta );
|
|
|
|
|
|
|
|
- // <p>f[o]o</p><p>bar</p>
|
|
|
|
|
- expect( transformed.length ).to.equal( 1 );
|
|
|
|
|
- expect( transformed[ 0 ].start.path ).to.deep.equal( [ 0, 1 ] );
|
|
|
|
|
- expect( transformed[ 0 ].end.path ).to.deep.equal( [ 0, 2 ] );
|
|
|
|
|
- } );
|
|
|
|
|
|
|
+ // <p>f[o]o</p><p>bar</p>
|
|
|
|
|
+ expect( transformed.length ).to.equal( 1 );
|
|
|
|
|
+ expect( transformed[ 0 ].start.path ).to.deep.equal( [ 0, 1 ] );
|
|
|
|
|
+ expect( transformed[ 0 ].end.path ).to.deep.equal( [ 0, 2 ] );
|
|
|
|
|
+ } );
|
|
|
|
|
|
|
|
- it( 'maintans start position when wrapping element in which the range starts but not ends', () => {
|
|
|
|
|
- root.removeChildren( root.childCount );
|
|
|
|
|
- root.appendChildren( [
|
|
|
|
|
- new Element( 'w', null, [
|
|
|
|
|
- new Element( 'p', null, new Text( 'foo' ) )
|
|
|
|
|
- ] ),
|
|
|
|
|
- new Element( 'p', null, new Text( 'bar' ) )
|
|
|
|
|
- ] );
|
|
|
|
|
|
|
+ it( 'maintans start position when wrapping element in which the range starts but not ends', () => {
|
|
|
|
|
+ root.removeChildren( root.childCount );
|
|
|
|
|
+ root.appendChildren( [
|
|
|
|
|
+ new Element( 'w', null, [
|
|
|
|
|
+ new Element( 'p', null, new Text( 'foo' ) )
|
|
|
|
|
+ ] ),
|
|
|
|
|
+ new Element( 'p', null, new Text( 'bar' ) )
|
|
|
|
|
+ ] );
|
|
|
|
|
|
|
|
- // <w><p>f[oo</p></w><p>b]ar</p>
|
|
|
|
|
- range.start = new Position( root, [ 0, 0, 1 ] );
|
|
|
|
|
- range.end = new Position( root, [ 1, 1 ] );
|
|
|
|
|
|
|
+ // <w><p>f[oo</p></w><p>b]ar</p>
|
|
|
|
|
+ range.start = new Position( root, [ 0, 0, 1 ] );
|
|
|
|
|
+ range.end = new Position( root, [ 1, 1 ] );
|
|
|
|
|
|
|
|
- const unwrapPosition = new Position( root, [ 0 ] );
|
|
|
|
|
- const delta = getUnwrapDelta( unwrapPosition, 1, 1 );
|
|
|
|
|
|
|
+ const unwrapPosition = new Position( root, [ 0 ] );
|
|
|
|
|
+ const delta = getUnwrapDelta( unwrapPosition, 1, 1 );
|
|
|
|
|
|
|
|
- const transformed = range.getTransformedByDelta( delta );
|
|
|
|
|
|
|
+ const transformed = range.getTransformedByDelta( delta );
|
|
|
|
|
|
|
|
- // <p>f[oo</p><p>b]ar</p>
|
|
|
|
|
- expect( transformed.length ).to.equal( 2 );
|
|
|
|
|
|
|
+ // <p>f[oo</p><p>b]ar</p>
|
|
|
|
|
+ expect( transformed.length ).to.equal( 2 );
|
|
|
|
|
|
|
|
- expect( transformed[ 0 ].start.path ).to.deep.equal( [ 0, 1 ] );
|
|
|
|
|
- expect( transformed[ 0 ].end.path ).to.deep.equal( [ 1, 1 ] );
|
|
|
|
|
|
|
+ expect( transformed[ 0 ].start.path ).to.deep.equal( [ 0, 1 ] );
|
|
|
|
|
+ expect( transformed[ 0 ].end.path ).to.deep.equal( [ 1, 1 ] );
|
|
|
|
|
|
|
|
- expect( transformed[ 1 ].root.rootName ).to.equal( '$graveyard' );
|
|
|
|
|
- } );
|
|
|
|
|
|
|
+ expect( transformed[ 1 ].root.rootName ).to.equal( '$graveyard' );
|
|
|
|
|
+ } );
|
|
|
|
|
|
|
|
- it( 'maintans end position when wrapping element in which the range ends but not starts', () => {
|
|
|
|
|
- root.removeChildren( root.childCount );
|
|
|
|
|
- root.appendChildren( [
|
|
|
|
|
- new Element( 'p', null, new Text( 'foo' ) ),
|
|
|
|
|
- new Element( 'w', null, [
|
|
|
|
|
- new Element( 'p', null, new Text( 'bar' ) )
|
|
|
|
|
- ] )
|
|
|
|
|
- ] );
|
|
|
|
|
|
|
+ it( 'maintans end position when wrapping element in which the range ends but not starts', () => {
|
|
|
|
|
+ root.removeChildren( root.childCount );
|
|
|
|
|
+ root.appendChildren( [
|
|
|
|
|
+ new Element( 'p', null, new Text( 'foo' ) ),
|
|
|
|
|
+ new Element( 'w', null, [
|
|
|
|
|
+ new Element( 'p', null, new Text( 'bar' ) )
|
|
|
|
|
+ ] )
|
|
|
|
|
+ ] );
|
|
|
|
|
|
|
|
- // <p>f[oo</p><w><p>b]ar</p></w>
|
|
|
|
|
- range.start = new Position( root, [ 0, 1 ] );
|
|
|
|
|
- range.end = new Position( root, [ 1, 0, 1 ] );
|
|
|
|
|
|
|
+ // <p>f[oo</p><w><p>b]ar</p></w>
|
|
|
|
|
+ range.start = new Position( root, [ 0, 1 ] );
|
|
|
|
|
+ range.end = new Position( root, [ 1, 0, 1 ] );
|
|
|
|
|
|
|
|
- const unwrapPosition = new Position( root, [ 1 ] );
|
|
|
|
|
- const delta = getUnwrapDelta( unwrapPosition, 1, 1 );
|
|
|
|
|
|
|
+ const unwrapPosition = new Position( root, [ 1 ] );
|
|
|
|
|
+ const delta = getUnwrapDelta( unwrapPosition, 1, 1 );
|
|
|
|
|
|
|
|
- const transformed = range.getTransformedByDelta( delta );
|
|
|
|
|
|
|
+ const transformed = range.getTransformedByDelta( delta );
|
|
|
|
|
|
|
|
- // <p>f[oo</p><p>b]ar</p>
|
|
|
|
|
- expect( transformed.length ).to.equal( 1 );
|
|
|
|
|
- expect( transformed[ 0 ].start.path ).to.deep.equal( [ 0, 1 ] );
|
|
|
|
|
- expect( transformed[ 0 ].end.path ).to.deep.equal( [ 1, 1 ] );
|
|
|
|
|
- } );
|
|
|
|
|
|
|
+ // <p>f[oo</p><p>b]ar</p>
|
|
|
|
|
+ expect( transformed.length ).to.equal( 1 );
|
|
|
|
|
+ expect( transformed[ 0 ].start.path ).to.deep.equal( [ 0, 1 ] );
|
|
|
|
|
+ expect( transformed[ 0 ].end.path ).to.deep.equal( [ 1, 1 ] );
|
|
|
} );
|
|
} );
|
|
|
} );
|
|
} );
|
|
|
} );
|
|
} );
|