Sha256: 40596bd6af798ed9d74a4de80c0d914aa6037f2239fad52bd274403997636fe4
Contents?: true
Size: 667 Bytes
Versions: 7
Compression:
Stored size: 667 Bytes
Contents
#!/usr/bin/env ruby HELP = <<-help Usage: gfm [--readme] [<file>] Convert a GitHub-Flavored Markdown file to HTML and write to standard output. With no <file> or when <file> is '-', read Markdown source text from standard input. With `--readme`, the files are parsed like README.md files in GitHub.com. By default, the files are parsed with all the GFM extensions. help if ARGV.include?('--help') puts HELP exit 0 end root = File.expand_path('../../', __FILE__) $:.unshift File.expand_path('lib', root) require 'github/markdown' mode = :gfm if ARGV.delete('--readme') mode = :markdown end STDOUT.write(GitHub::Markdown.to_html(ARGF.read, mode))
Version data entries
7 entries across 7 versions & 1 rubygems