class Jekyll::PreCommit::Checks::SpellCheck

This is a work-in-progress.

Public Instance Methods

check(staged, not_staged, site, args) click to toggle source
# File lib/jekyll-pre-commit/checks/spell_check.rb, line 6
def check(staged, not_staged, site, args)
  staged.each do |post|
    rendered = Jekyll::Renderer.new(site, post).run
    rendered.gsub!('"', '\"')
    mispells = `echo "#{rendered}" | sed "s/’/'/g" | aspell list -H --add-html-skip=pre --add-html-skip=code`
    puts mispells
  end
  exit 1
end