Module: Markdpwn
- Defined in:
- lib/markdpwn.rb,
lib/markdpwn/code.rb,
lib/markdpwn/docs.rb,
lib/markdpwn/dpwn.rb,
lib/markdpwn/glue.rb,
lib/markdpwn/red_carpet_renderer.rb
Overview
HTML-formats text documents such as Markdown, textile, and source code.
Defined Under Namespace
Modules: Code, Docs, Dpwn Classes: RedCarpetRenderer
Class Method Summary collapse
-
.markdpwn(text, options = {}) ⇒ Object
Marks up a markdpwn text document.
-
.markup(text, options = {}) ⇒ String
Marks up a text document.
Class Method Details
.markdpwn(text, options = {}) ⇒ Object
Marks up a markdpwn text document.
The caller is responsible for ensuring that the text uses markdpwn, otherwise extreme ugliness might ensue. Use Markdpwn.markup when unsure.
28 29 30 |
# File 'lib/markdpwn/glue.rb', line 28 def self.markdpwn(text, = {}) Markdpwn::Dpwn.render text, end |
.markup(text, options = {}) ⇒ String
Marks up a text document.
14 15 16 17 18 19 20 21 22 |
# File 'lib/markdpwn/glue.rb', line 14 def self.markup(text, = {}) if Markdpwn::Dpwn.accepts? Markdpwn::Dpwn.render text, elsif html = Markdpwn::Docs.gh_markup(text, ) html else Markdpwn::Code.render text, end end |