Class: Courrier::Markdown
- Inherits:
-
Object
- Object
- Courrier::Markdown
show all
- Defined in:
- lib/courrier/markdown.rb
Defined Under Namespace
Classes: CommonmarkerParser, KramdownParser, Parser, RedcarpetParser
Class Method Summary
collapse
Class Method Details
.available? ⇒ Boolean
6
7
8
|
# File 'lib/courrier/markdown.rb', line 6
def available?
defined?(::Redcarpet) || defined?(::Kramdown) || defined?(::Commonmarker)
end
|
.render(text) ⇒ Object
10
11
12
13
14
|
# File 'lib/courrier/markdown.rb', line 10
def render(text)
return unless available?
parser.parse(text.to_s)
end
|