Class: Jekyll::PreCommit::Checks::SpellCheck
- Defined in:
- lib/jekyll-pre-commit/checks/spell_check.rb
Overview
This is a work-in-progress.
Instance Method Summary collapse
Methods inherited from Check
Constructor Details
This class inherits a constructor from Jekyll::PreCommit::Checks::Check
Instance Method Details
#check(staged, not_staged, site, args) ⇒ Object
6 7 8 9 10 11 12 13 14 |
# 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 |