Class: Lookbook::Markdown
- Inherits:
-
Object
- Object
- Lookbook::Markdown
- Defined in:
- lib/lookbook/markdown.rb
Defined Under Namespace
Classes: Renderer
Constant Summary collapse
- DEFAULT_OPTIONS =
{ tables: true, fenced_code_blocks: true, disable_indented_code_blocks: true, strikethrough: true, highlight: true, with_toc_data: true, lax_spacing: true }
Class Method Summary collapse
Class Method Details
.render(text) ⇒ Object
15 16 17 18 19 |
# File 'lib/lookbook/markdown.rb', line 15 def self.render(text) text&.gsub!(/<!-- (BEGIN|END) (.*) -->/, "") markdown = Redcarpet::Markdown.new(Renderer, Lookbook.config.) markdown.render(text).html_safe end |