Sha256: ed7505a800e65748bb00456e7f1d96f4d5d1b2a04f2420b82d91d6a91ba9165d
Contents?: true
Size: 723 Bytes
Versions: 22
Compression:
Stored size: 723 Bytes
Contents
#!/usr/bin/env ruby HELP = <<-help Usage: gfm [--readme | --plaintext] [<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 mode = :markdown if ARGV.delete('--readme') mode = :plaintext if ARGV.delete('--plaintext') STDOUT.write(GitHub::Markdown.to_html(ARGF.read, mode))
Version data entries
22 entries across 21 versions & 3 rubygems