fix: check initialisms list in capitalizeWord before checking if word ends with "S"

This commit is contained in:
Jonathan Barrow 2026-01-26 14:27:50 -05:00
parent 0ee8d52fe1
commit 6b70800444
No known key found for this signature in database
GPG Key ID: 2A7DAA6DED5A77E5

View File

@ -79,6 +79,11 @@ func (cp *ConfigParser[T]) capitalizeWord(word string) string {
}
upper := strings.ToUpper(word)
if cp.initialisms[upper] {
return upper
}
endsWithS := strings.HasSuffix(upper, "S")
withoutS := strings.TrimSuffix(upper, "S")