|
|
@@ -94,7 +94,7 @@ describe( 'Autoformat', () => {
|
|
|
it( 'should replace digit with numbered list item using the parenthesis format', () => {
|
|
|
setData( doc, '<paragraph>1)[]</paragraph>' );
|
|
|
doc.enqueueChanges( () => {
|
|
|
- batch.insert( doc.selection.getFirstPosition(), ' ' );
|
|
|
+ batch.insertText( ' ', doc.selection.getFirstPosition() );
|
|
|
} );
|
|
|
|
|
|
expect( getData( doc ) ).to.equal( '<listItem indent="0" type="numbered">[]</listItem>' );
|
|
|
@@ -103,7 +103,7 @@ describe( 'Autoformat', () => {
|
|
|
it( 'should not replace digit character when there is no . or ) in the format', () => {
|
|
|
setData( doc, '<paragraph>1[]</paragraph>' );
|
|
|
doc.enqueueChanges( () => {
|
|
|
- batch.insert( doc.selection.getFirstPosition(), ' ' );
|
|
|
+ batch.insertText( ' ', doc.selection.getFirstPosition() );
|
|
|
} );
|
|
|
|
|
|
expect( getData( doc ) ).to.equal( '<paragraph>1 []</paragraph>' );
|