Permalink
Browse files

Sanity check Markdowns.

  • Loading branch information...
1 parent 4a7ba57 commit 74c842008240a2d815c0c38efa03fc3a259ba7bc @djanowski djanowski committed Sep 24, 2010
Showing with 7 additions and 2 deletions.
  1. +7 −2 Rakefile
View
@@ -3,8 +3,13 @@ task :default => :parse
task :parse do
require "json"
require "batch"
+ require "rdiscount"
- Batch.each(Dir["**/*.json"]) do |file|
- JSON.parse(File.read(file))
+ Batch.each(Dir["**/*.json"] + Dir["**/*.md"]) do |file|
+ if File.extname(file) == ".md"
+ RDiscount.new(File.read(file)).to_html
+ else
+ JSON.parse(File.read(file))
+ end
end
end

0 comments on commit 74c8420

Please sign in to comment.