diff options
Diffstat (limited to 'ext/standard/metaphone.c')
| -rw-r--r-- | ext/standard/metaphone.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/ext/standard/metaphone.c b/ext/standard/metaphone.c index bf66a79b86..d39ea13194 100644 --- a/ext/standard/metaphone.c +++ b/ext/standard/metaphone.c @@ -225,15 +225,14 @@ static int metaphone(unsigned char *word, int word_len, long max_phonemes, char w_idx += 2; } break; - /* WH becomes H, + /* WH becomes W, WR becomes R W if followed by a vowel */ case 'W': - if (Next_Letter == 'H' || - Next_Letter == 'R') { + if (Next_Letter == 'R') { Phonize(Next_Letter); w_idx += 2; - } else if (isvowel(Next_Letter)) { + } else if (Next_Letter == 'H' || isvowel(Next_Letter)) { Phonize('W'); w_idx += 2; } |
