PolishWording: Fix 'i' capitalization (#573)
* Fix 'i' capitalization * Remove redundant capitalization fix for 'i' Removed duplicate capitalization fix for stand-alone 'i'. * Fix spacing in polishWording index.ts --------- Co-authored-by: thororen <78185467+thororen1234@users.noreply.github.com>
This commit is contained in:
parent
c3edc31db3
commit
6e3af4921d
1 changed files with 2 additions and 2 deletions
|
|
@ -275,8 +275,8 @@ function capitalize(textInput: string): string {
|
|||
}
|
||||
}
|
||||
|
||||
// We'll fix capitalization of I's
|
||||
result = result.replace(/\bi[\b']/g, "I");
|
||||
// Stand-alone i's turn into I, unless there's the word 'is' after, cus then it's a vowel and not someone talking about themselves
|
||||
result = result.replace(/\bi\b(?!\s+is\b)(?=['\s]|$)/g, "I");
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue