Skip to content

Instantly share code, notes, and snippets.

@neoascetic
Created June 7, 2024 14:04
Show Gist options
  • Save neoascetic/748738bb4d939980a7a460b46919efdb to your computer and use it in GitHub Desktop.
Save neoascetic/748738bb4d939980a7a460b46919efdb to your computer and use it in GitHub Desktop.
GitHub Flavored Markdown render script
#!/usr/bin/env ruby
require 'redcarpet'
class HTMLWithPants < Redcarpet::Render::HTML
include Redcarpet::Render::SmartyPants
end
markdown = Redcarpet::Markdown.new(HTMLWithPants, fenced_code_blocks: true)
puts markdown.render STDIN.read
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment