Skip to content

Instantly share code, notes, and snippets.

@rakuishi
Created January 23, 2015 14:27
Show Gist options
  • Save rakuishi/8a481e86075109012567 to your computer and use it in GitHub Desktop.
Save rakuishi/8a481e86075109012567 to your computer and use it in GitHub Desktop.
# -*- coding: utf-8 -*-
require 'fileutils'
Dir.glob('content/archives/*.md').each do |filename|
content = File.open(filename).read;
content = content.gsub('<pre class="prettyprint">', '<pre><code>')
content = content.gsub('</pre>', '</code></pre>')
File.binwrite(filename, content)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment