Skip to content

Commit

Permalink
Merge branch 'master' into ck/5954-memory-leaks
Browse files Browse the repository at this point in the history
  • Loading branch information
oleq committed Nov 4, 2021
2 parents 546d453 + 9dc7bd8 commit 5144be2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
6 changes: 3 additions & 3 deletions docs/framework/guides/package-generator.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ Available modifiers for the command are:

After successfully creating the new package, enter it by executing the following command:

```
// assuming that your package was created with `ckeditor5-foo` as its name
```bash
# Assuming that your package was created with `ckeditor5-foo` as its name.
cd ckeditor5-foo
```

Then run the test environment for the plugin by executing:

```
```bash
npm run start
```

Expand Down
2 changes: 1 addition & 1 deletion packages/ckeditor5-find-and-replace/src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ export function findByTextCallback( searchTerm, options ) {
}

if ( !new RegExp( nonLetterGroup + '$' ).test( searchTerm ) ) {
regExpQuery = `${ regExpQuery }(?:_|${ nonLetterGroup }|$)`;
regExpQuery = `${ regExpQuery }(?=_|${ nonLetterGroup }|$)`;
}
}

Expand Down
8 changes: 8 additions & 0 deletions packages/ckeditor5-find-and-replace/tests/findcommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,14 @@ describe( 'FindCommand', () => {
expect( results.length ).to.equal( 0 );
} );

it( 'set to true matches words separated by a single space', () => {
editor.setData( '<p>bar bar</p>' );

const { results } = command.execute( 'bar', { wholeWords: true } );

expect( results.length ).to.equal( 2 );
} );

it( 'is disabled by default', () => {
editor.setData( '<p>foo aabaraa</p>' );

Expand Down

0 comments on commit 5144be2

Please sign in to comment.