diff --git a/src/autoformat.js b/src/autoformat.js
index a299331..10d4f72 100644
--- a/src/autoformat.js
+++ b/src/autoformat.js
@@ -56,7 +56,7 @@ export default class Autoformat extends Plugin {
if ( commands.get( 'numberedList' ) ) {
// eslint-disable-next-line no-new
- new BlockAutoformatEditing( this.editor, /^\d+[.|)]\s$/, 'numberedList' );
+ new BlockAutoformatEditing( this.editor, /^1[.|)]\s$/, 'numberedList' );
}
}
diff --git a/tests/autoformat.js b/tests/autoformat.js
index fa412f2..76ddfde 100644
--- a/tests/autoformat.js
+++ b/tests/autoformat.js
@@ -117,6 +117,15 @@ describe( 'Autoformat', () => {
expect( getData( model ) ).to.equal( '1. []' );
} );
+
+ it( 'should not replace digit with numbered list item when digit is different than "1"', () => {
+ setData( model, '3.[]' );
+ model.change( writer => {
+ writer.insertText( ' ', doc.selection.getFirstPosition() );
+ } );
+
+ expect( getData( model ) ).to.equal( '3. []' );
+ } );
} );
describe( 'Heading', () => {