Commit 42c41827 authored by Simon Will's avatar Simon Will
Browse files

Slightly change regex in generate_synizesis

parent 66973f50
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -432,7 +432,8 @@ def generate_synizesis(reading):
            other_syl = token.syllables[i+1]
            new_text = syl.text+other_syl.text

            match = re.search(r'[aeiouvy]h?[aeiouvy]', new_text)
            match = re.search(r'(?<!q)[aeiouvy]h?[aeiouvy]', new_text,
                              flags=re.IGNORECASE)
                
            if match:  
                in_syllables = match.start() < len(syl.text) < match.end()