diff --git a/CHANGES.rst b/CHANGES.rst index 342e41f..7d37f6d 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v6.0.3 +====== + +* #136: A/an support now more correctly honors leading + capitalized words and abbreviations. + v6.0.2 ====== diff --git a/inflect/__init__.py b/inflect/__init__.py index 78d2e33..733aa5d 100644 --- a/inflect/__init__.py +++ b/inflect/__init__.py @@ -1854,7 +1854,7 @@ def get_si_pron(thecase, word, gender) -> str: A_abbrev = re.compile( r""" -(?! FJO | [HLMNS]Y. | RY[EO] | SQU +^(?! FJO | [HLMNS]Y. | RY[EO] | SQU | ( F[LR]? | [HL] | MN? | N | RH? | S[CHKLMNPTVW]? | X(YL)?) [AEIOU]) [FHLMNRSX][A-Z] """, diff --git a/tests/test_an.py b/tests/test_an.py index 7c1e588..7102c30 100644 --- a/tests/test_an.py +++ b/tests/test_an.py @@ -21,7 +21,6 @@ def test_an(): assert p.an("wild PIKACHU appeared") == "a wild PIKACHU appeared" -@__import__('pytest').mark.xfail(reason="#136") def test_an_abbreviation(): p = inflect.engine()