Class: Quiver::Cell::Markdown

Inherits:
Quiver::Cell show all
Defined in:
lib/quiver/cell.rb

Instance Method Summary collapse

Constructor Details

#initialize(note, json) ⇒ Markdown

Returns a new instance of Markdown.



14
15
16
17
18
19
# File 'lib/quiver/cell.rb', line 14

def initialize(note, json)
  super
  @data.gsub!(%r|quiver-image-url/([^)]+)|) do |path|
    @note.image_url(path)
  end
end

Instance Method Details

#to_htmlObject



20
21
22
# File 'lib/quiver/cell.rb', line 20

def to_html
  Quiver.config.markdown_renderer.call(@data)
end