Repository navigation
Match blank text with a blank-text regex under ByWordAny [patch] - #195
matt-edmondson wants to merge 2 commits into
Conversation
DoesMatchRegex returned false for text with no words before it tried the ByWordAny whole-text match, so a filter written to find blank entries (`^\s*$`, `\s+`, `^$`) missed exactly those under the default option. The whole-text attempt now comes first. The no-words return still stops ByWordAll matching blank text vacuously (#107/#109). Fixes #193 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017vfJW5JaSLvVsxrZiNZpKh
EveryMethodInTheReadmeApiReferenceExistsWithItsDocumentedDefaults fails on main at 5f420d9. This is #186's change, verbatim, so the two merge cleanly whichever lands first. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017vfJW5JaSLvVsxrZiNZpKh
|
The fix already exists in #186, and it is test-only, so 28b8ef4 ports it here verbatim. Whichever of the two PRs lands first, the other merges cleanly. Locally, 280/280 tests now pass. Generated by Claude Code |
|
|
All tests on Windows, Linux and macOS, plus Analyze & Release, are green at 28b8ef4. The only red check is SonarCloud Code Analysis (D maintainability rating on new code), and this PR didn't cause it:
Generated by Claude Code |




Fixes #193
What was wrong
DoesMatchRegexreturnedfalsefor text with no words (""," ") before it tried the ByWordAny whole-text match added for #125. As a result, a regex written to find blank entries (^\s*$,\s+,^$) missed exactly those entries under the defaultByWordAny, even though it matched them underByWholeString.Change
The ByWordAny whole-text attempt now runs before the no-words return. That return stays in place for ByWordAll, so blank text still can't match vacuously there (#107/#109).
Tests
RegexByWordAnyMatchesBlankTextWithAPatternForBlankText: six blank or whitespace-only texts against blank-finding patterns, under ByWordAny and ByWholeString.RegexByWordAllStillMatchesNoBlankText: the same kind of patterns still match nothing under ByWordAll.RegexByWordAnyDoesNotMatchBlankTextWithAPatternThatNeedsAWord:zzzand\wstill don't match blank text.RegexByWordAnyFilterKeepsTheBlankEntries:Filterwith^\s*$keeps""and" "and drops the rest.TextFilter.cschange reverted, 7 of the new cases fail. The ByWordAll and needs-a-word cases pass either way and stay in as guards.EveryMethodInTheReadmeApiReferenceExistsWithItsDocumentedDefaults, fails the same way onmainat 5f420d9 and is addressed by Hold only the visible overloads to the README's documented defaults [patch] #186.Generated by Claude Code