minivan / middleman-spellcheck

Run a spell checking job through aspell every time you build with middleman.
MIT License
13 stars 10 forks source link

Words with single quotes before or after are being marked misspelled #16

Closed mwils closed 8 years ago

mwils commented 8 years ago

Here is a few examples, spellcheck Running spell checker for /templates/development-helpers/ misspell The word ''Name' is misspelled misspell The word ''data' is misspelled misspell The word ''none'' is misspelled

I can work on this. Any guesses on where to start looking?

Could it be related to this? https://github.com/minivan/middleman-spellcheck/blame/e3a85d910fd99d92e9d17480ce72154118050af7/lib/middleman-spellcheck/spellchecker.rb#L80

zealot128 commented 8 years ago

Yes, I think that is the right place.

AFAIK quote is also considered a "word" character, as English language uses the apostrophes a lot. and stuff like "hasn't" would be marked as typo otherwise.

You can try to create a spec or feature with your word as input and try to fix it by split(...).map {|word| # do something } it before passing it to the select. This map could remove leading and trailing quotes.

zealot128 commented 8 years ago

You could also try pull request #21, that also includes some quote tidy up!