Module: GFM
- Defined in:
- lib/gfm.rb,
lib/gfm/converter.rb
Defined Under Namespace
Classes: Converter
Constant Summary collapse
- HELP_TEXT =
"Usage:\n gfm INPUT_FILE.md [OUTPUT_FILE] [--help, -h]\n\n INPUT_FILE.md The markdown file to be parsed with GitHub Flavored Markdown.\n\n OUTPUT_FILE Name of the output file to be generated. If no name is given,\n INPUT_FILE.html is used.\n\n --help, -h Display this help message.\n"
Class Method Summary collapse
Class Method Details
.pipeline ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/gfm.rb', line 18 def self.pipeline HTML::Pipeline.new [ HTML::Pipeline::MarkdownFilter, HTML::Pipeline::TableOfContentsFilter, HTML::Pipeline::SanitizationFilter, HTML::Pipeline::ImageMaxWidthFilter, HTML::Pipeline::HttpsFilter, HTML::Pipeline::MentionFilter, HTML::Pipeline::SyntaxHighlightFilter ] end |
.stylesheet_tags ⇒ Object
30 31 32 33 34 |
# File 'lib/gfm.rb', line 30 def self. HTTPClient.new.get("https://github.com").body.split("\n").select do |line| line =~ /https:.*github.*\.css/ end.join end |