Skip to content

Conversation

@lkspencer
Copy link

Fixes a number of issues with nested/spanned nodes and simplifies the regular expressions.

Fixes a number of issues with nested/spanned nodes and simplifies the regular expressions.
@lkspencer
Copy link
Author

If you go to the CKEditor demo and paste the following HTML into the source, previously it would not find and replace all of the misspelled words. I've used several situations of spanned nodes and partial words and particularly teste followed by stem cell would previously get concatinated in the old code to testestem cell which has teste in there twice making it more difficult to properly find the right instance and correct it. This update takes care of every one of these situations.

<p>this is a test</p>

<p>I need to <strike>k</strike><em><strike>n<strong>o</strong></strike>o</em>w</p>

<p>if it will woork</p>

<p>testi knoow <strike>wo<u>o</u><em>r</em><strong>k</strong></strike></p>

<p>testily</p>

<p>teste</p>

<p>stem cell</p>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

\b is suitable for Latin characters but it doesn't work correctly with all Unicode characters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants