Module: GFM
- Defined in:
- lib/gfm.rb,
lib/gfm/version.rb,
lib/gfm/converter.rb
Defined Under Namespace
Classes: Converter
Constant Summary collapse
- HELP_TEXT =
"Usage: gfm INPUT_FILE.md [OUTPUT_FILE] [options]\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\n --version, -v Display the version number.\n"- VERSION =
'0.1.5'
Class Method Summary collapse
Class Method Details
.pipeline ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/gfm.rb', line 21 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
33 34 35 36 37 |
# File 'lib/gfm.rb', line 33 def self. HTTPClient.new.get("https://github.com").body.split("\n").select do |line| line =~ /https:.*github.*\.css/ end.join end |