User interface enhancements and beta features for http://ckeditor-spellcheck.nanospell.com . This repo is for nanospell developers and trusted partners to modify and fork plugin.js
Adding the if checks in the returns of WordWalker.getNextWord caused an issue where if the word was an empty string, the loop would continue and this could cause a returned range to include multiple words. This caused spellcheck spans to get wrapped around multiple words incorrectly, as well as potentially causing nested spellcheck spans.
Instead, the responsibility of ignoring empty strings is moved to the functions where WordWalker.getNextWord is called. This was already the case in markTyposInRange, and is now added to getWords, as well as the getWordsWithWordWalker function in the wordwalker.js test.
Adding the
if
checks in the returns ofWordWalker.getNextWord
caused an issue where if the word was an empty string, the loop would continue and this could cause a returned range to include multiple words. This caused spellcheck spans to get wrapped around multiple words incorrectly, as well as potentially causing nested spellcheck spans.Instead, the responsibility of ignoring empty strings is moved to the functions where
WordWalker.getNextWord
is called. This was already the case inmarkTyposInRange
, and is now added togetWords
, as well as thegetWordsWithWordWalker
function in thewordwalker.js
test.