Commit 64a789e
fix: honor single-char symbol conjunctions regardless of name length (closes #151)
The `join_on_conjunction` heuristic skipped single-character conjunctions
when `total_length < 4` to avoid treating alphabetic initials like `e` or
`y` as conjunctions. This inadvertently also skipped non-alphabetic symbols
like `&`, which can never be initials.
Fix: only apply the "treat as initial" fallback when the character is
alphabetic. Non-alphabetic conjunctions (e.g. `&`) are now always joined
regardless of name length, so `"Mr. & Mrs. John Smith"` correctly parses
the title as `"Mr. & Mrs."`.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent b488e97 commit 64a789e
2 files changed
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
870 | 870 | | |
871 | 871 | | |
872 | 872 | | |
873 | | - | |
| 873 | + | |
874 | 874 | | |
875 | 875 | | |
876 | 876 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
114 | 122 | | |
115 | 123 | | |
116 | 124 | | |
| |||
0 commit comments