Closed bancron closed 1 year ago
There is a bug with certain strings of capital letters appearing in words that results in bad results from a(). For example it should be "a Spicy BLT Sauce", not "an Spicy BLT Sauce".
a()
This appears to have to do with
A_abbrev = re.compile( r""" (?! FJO | [HLMNS]Y. | RY[EO] | SQU | ( F[LR]? | [HL] | MN? | N | RH? | S[CHKLMNPTVW]? | X(YL)?) [AEIOU]) [FHLMNRSX][A-Z] """, re.VERBOSE, )
matching the "LT" part. It seems to me that the regex should be anchored (^...) or in some fashion not match random "LT" in the middle of words.
^...
I would really appreciate it if you could fix this bug. Thank you!
Duplicate of https://github.com/jaraco/inflect/issues/136.
There is a bug with certain strings of capital letters appearing in words that results in bad results from
a()
. For example it should be "a Spicy BLT Sauce", not "an Spicy BLT Sauce".This appears to have to do with
matching the "LT" part. It seems to me that the regex should be anchored (
^...
) or in some fashion not match random "LT" in the middle of words.I would really appreciate it if you could fix this bug. Thank you!