olivernn/lunr.js — pull request #84 by VMihai (2014-04-15 14:46:48+00:00)
Title: Fixed stemming words ending with letter 'y' according to Porter2 algorithm

While searching for the word `lay`, I noticed that there are no results, though I had a lot of `layout` words in my documents.

When debugging, I noticed that `lay` was transformed into `lai`, due to step 1c from the [Porter2 algorithm](http://snowball.tartarus.org/algorithms/english/stemmer.html).

When reviewing step 1c, I noticed that we should *only* convert the `y` to `i` in words containing non-vowels before `y`, so `lay` should have stayed `lay` after this step.

This PR contains the correct implementation of step 1c. I've also added two test fixtures.