Created
June 7, 2024 14:04
-
-
Save neoascetic/748738bb4d939980a7a460b46919efdb to your computer and use it in GitHub Desktop.
GitHub Flavored Markdown render script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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