Skip to content

Commit ab44bcf

Browse files
committed
Initial progress on spell check
1 parent e69ce0d commit ab44bcf

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
module Jekyll
2+
module PreCommit
3+
module Checks
4+
# This is a work-in-progress.
5+
class SpellCheck < Check
6+
def check(staged, not_staged, site, args)
7+
staged.each do |post|
8+
rendered = Jekyll::Renderer.new(site, post).run
9+
rendered.gsub!('"', '\"')
10+
mispells = `echo "#{rendered}" | aspell list -H --add-html-skip=pre --add-html-skip=code`
11+
puts mispells
12+
end
13+
exit 1
14+
end
15+
end
16+
end
17+
end
18+
end

0 commit comments

Comments
 (0)