diff --git a/src/script/functions/spelling.cpp b/src/script/functions/spelling.cpp index 22e944fb..50afa5b1 100644 --- a/src/script/functions/spelling.cpp +++ b/src/script/functions/spelling.cpp @@ -50,6 +50,10 @@ void check_word(const String& tag, const String& input, size_t start, size_t end if (!good) { out += _(" 0) check_this_word = false; ++pos; } else { // a non-word character, punctuation or space // check word, add to result - check_word(tag, input, word_start, pos, result, unchecked_tag <= 0, checkers, extra_match, ctx); + check_word(tag, input, word_start, pos, result, check_this_word, checkers, extra_match, ctx); word_start = String::npos; + check_this_word = unchecked_tag <= 0; result += c; ++pos; } } // last word - check_word(tag, input, word_start, input.size(), result, unchecked_tag <= 0, checkers, extra_match, ctx); + check_word(tag, input, word_start, input.size(), result, check_this_word, checkers, extra_match, ctx); // done assert_tagged(result); SCRIPT_RETURN(result);