diff --git a/inflect/__init__.py b/inflect/__init__.py index dd1b3a5..47a8e05 100644 --- a/inflect/__init__.py +++ b/inflect/__init__.py @@ -1986,7 +1986,7 @@ def get_si_pron(thecase, word, gender) -> str: PLVERB_SPECIAL_S_RE = re.compile(rf"^({plverb_special_s})$") WHITESPACE = re.compile(r"\s") ENDS_WITH_S = re.compile(r"^(.*[^s])s$", re.IGNORECASE) -ENDS_WITH_APOSTROPHE_S = re.compile(r"^(.*)'s?$") +ENDS_WITH_APOSTROPHE_S = re.compile(r"^(.+)'s?$") INDEFINITE_ARTICLE_TEST = re.compile(r"\A(\s*)(?:an?\s+)?(.+?)(\s*)\Z", re.IGNORECASE) SPECIAL_AN = re.compile(r"^[aefhilmnorsx]$", re.IGNORECASE) SPECIAL_A = re.compile(r"^[bcdgjkpqtuvwyz]$", re.IGNORECASE) diff --git a/newsfragments/218.feature.rst b/newsfragments/218.feature.rst new file mode 100644 index 0000000..129bfe4 --- /dev/null +++ b/newsfragments/218.feature.rst @@ -0,0 +1 @@ +Handle a single apostrophe more gracefully. \ No newline at end of file diff --git a/tests/test_pwd.py b/tests/test_pwd.py index e3390dd..ff8064c 100644 --- a/tests/test_pwd.py +++ b/tests/test_pwd.py @@ -743,6 +743,7 @@ def test__pl_general_verb(self): ("tuna's", "tuna's"), ("TUNA's", "TUNA's"), ("bad", False), + ("'", False), pytest.param( "JOHN's", "JOHNS'",