From cbc155b030794a0893f54319219502d08ebe31db Mon Sep 17 00:00:00 2001 From: Jordan Suchow Date: Tue, 27 Jan 2015 09:25:54 -0800 Subject: [PATCH] Tweak regular expression for determiner detecting #31 --- proselint/checks/mau_a_vs_an.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proselint/checks/mau_a_vs_an.py b/proselint/checks/mau_a_vs_an.py index b34c54e11..48120554e 100644 --- a/proselint/checks/mau_a_vs_an.py +++ b/proselint/checks/mau_a_vs_an.py @@ -48,7 +48,7 @@ def starts_with_vowel_sound(word): return None errors = [] - regex = re.compile("(^|\s+)(A|a|An|an)\s(\S*)\W") + regex = re.compile("(?:^|\W)(an?)\s+(\w+)", re.IGNORECASE) # Find all occurences of the regex in the text. for m in regex.finditer(text):