Module: Markdpwn::Docs
- Defined in:
- lib/markdpwn/docs.rb
Overview
Document (e.g. textile, markdown) formatting.
Class Method Summary collapse
-
.gh_markup(text, options = {}) ⇒ String
The raw GitHub::Markup output for parsing a text document.
Class Method Details
.gh_markup(text, options = {}) ⇒ String
The raw GitHub::Markup output for parsing a text document.
23 24 25 26 27 28 29 30 31 32 |
# File 'lib/markdpwn/docs.rb', line 23 def self.gh_markup(text, = {}) # NOTE: the MIME type is specified in the API so clients won't need to # change if/when MIME-based detection is added file_name = [:file_name] if file_name && GitHub::Markup.can_render?(file_name, text) GitHub::Markup.render file_name, text else nil end end |