Commit 8d5f769
* fix: recognize single-letter suffix_not_acronyms (e.g. 'V') in suffix-comma format (closes #136)
Roman numeral suffixes like 'V' are single uppercase letters, which the
initial regex also matches. In suffix-comma format ("John Ingram, V") the
post-comma position is unambiguous, so the initial guard should not block
recognition. Add are_suffixes_after_comma() that bypasses the initial check
for suffix_not_acronyms members and use it at the suffix-comma detection site,
leaving is_suffix() unchanged for the no-comma path where 'V' mid-name should
still be treated as an initial.
* test: add coverage for suffix_not_acronyms members in suffix-comma format
Add tests for 'I' (same single-letter ambiguity as 'V'), a mixed
suffix-comma case (V MD), and two suffix_not_acronyms members together
(V Jr.). Also tighten the are_suffixes_after_comma docstring to describe
the short-circuit mechanism accurately and enumerate the full scope of
affected suffix_not_acronyms entries.
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 1fe391c commit 8d5f769
2 files changed
Lines changed: 47 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
487 | 487 | | |
488 | 488 | | |
489 | 489 | | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
490 | 507 | | |
491 | 508 | | |
492 | 509 | | |
| |||
686 | 703 | | |
687 | 704 | | |
688 | 705 | | |
689 | | - | |
| 706 | + | |
690 | 707 | | |
691 | 708 | | |
692 | 709 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
37 | 66 | | |
38 | 67 | | |
39 | 68 | | |
| |||
0 commit comments