Class: MarkdownUI::Parser
- Inherits:
-
Object
- Object
- MarkdownUI::Parser
- Defined in:
- lib/markdown-ui/parser.rb
Instance Method Summary collapse
-
#initialize ⇒ Parser
constructor
A new instance of Parser.
- #render(markdown) ⇒ Object
Constructor Details
#initialize ⇒ Parser
3 4 5 |
# File 'lib/markdown-ui/parser.rb', line 3 def initialize @parser = Redcarpet::Markdown.new(MarkdownUI::Renderer, quote: true, tables: true, xhtml: true) end |
Instance Method Details
#render(markdown) ⇒ Object
7 8 9 |
# File 'lib/markdown-ui/parser.rb', line 7 def render(markdown) @parser.render(markdown) end |