sapegin / textlint-rule-stop-words

Textlint rule to find filler words, buzzwords and clichés
MIT License
20 stars 6 forks source link

Fix: Exclude words longer than one letter #2

Closed pixelastic closed 6 years ago

pixelastic commented 6 years ago

I tried to exclude some words using the syntax defined in the documentation, like this:

{
  "stop-words": {
    "exclude": ["relative to"]
  }
}

But nothing was excluded. By checking the tests, I realized that tests were only passing for one-letter "words", but failing otherwise. I updated the tests to make them fail (yeah TDD) then updated the code.

I ended up modifying the method to compare the exclude with the word form the dictionary, and only compare to the actual word (not its replacement).

Hope that helps :)

sapegin commented 6 years ago

Cool, thanks!

sapegin commented 6 years ago

:tada: This PR is included in version 1.0.4 :tada:

The release is available on:

Your semantic-release bot :package::rocket: