Commit 3a8a43b
Guard against empty or whitespace-only input in parseText()
When parseText() is called with an empty or whitespace-only string,
similarity matching against templates via similar_text() produces
undefined/meaningless scores and brute-force matching wastes cycles.
Return early with an empty ParseResult and log a warning instead.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 94da5b6 commit 3a8a43b
1 file changed
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
47 | 53 | | |
48 | 54 | | |
49 | 55 | | |
| |||
0 commit comments