minivan / middleman-spellcheck

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

Spellcheck is pulling out all kinds of words that are spelled correctly #7

Closed superkinz closed 9 years ago

superkinz commented 10 years ago

When I run my build, it's alerting me to all kinds of words which are clearly properly spelled. See image. Any idea why it's identifying basically every word as misspelled?

screen shot 2014-07-17 at 2 21 09 pm

minivan commented 10 years ago

Could you please show which version of aspell you're using? There might be some formatting differences with different versions.

superkinz commented 10 years ago

I did a brew install on that, and it gave me aspell6-en-7.1-0. However, when I do bundle show, it's not coming up. Do I need to reference the aspell in my gemfile and config?

minivan commented 10 years ago

It looks like it's the dictionary version.

Could you please show the output of aspell --version ?

On 18 July 2014 20:26, Andrew Kinzer notifications@github.com wrote:

I did a brew install on that, and it gave me aspell6-en-7.1-0. However, when I do bundle show, it's not coming up. Do I need to reference the aspell in my gemfile and config?

— Reply to this email directly or view it on GitHub https://github.com/minivan/middleman-spellcheck/issues/7#issuecomment-49457437 .

superkinz commented 10 years ago

Thanks for checking in. Here's what I got:

@(#) International Ispell Version 3.1.20 (but really Aspell 0.60.6.1)

ukd1 commented 10 years ago

I'm getting this too, looking at how to run a different dictionary (US eng)

superkinz commented 10 years ago

Any update on what's going on?

olds22 commented 10 years ago

I just submitted a pull request that solved this issue for me. Hopefully it works for you too. see: pull request https://github.com/minivan/middleman-spellcheck/pull/10.

minivan commented 10 years ago

Merged in, bumped up the version. Thanks a lot @olds22 !

olds22 commented 10 years ago

Thanks, @minivan for merging pull request #10 in so quickly.

@superkinz & @ukd1, I also had a similar issue on some posts where I'm using code blocks. My guess is the parser has a little trouble with complicated pieces of code. Plus, you'll get a lot of false positives in there anyway, with class names and abbreviated variables, etc. Therefore, I added this line in my config.rb file, which essentially covers most of my content, but skips any generic <div>, <pre>, <code>, & <table> tags:

activate :spellcheck, tags: [:p, :h1, :h2, :h3, :h4, :h5, :h6, :ul, :ol, :blockquote]

Maybe this will work for you too, depending on your site's layout. Note that it will still check tags that are nested within any of the list. So, if you write something like this, it will catch the misspelling in the nested code tag:

%p
  This code word is
  %code misspeled