class Eyemask::Liquid::Note
Constants
- MARKDOWN
Public Class Methods
new(tag_name, markup, tokens)
click to toggle source
Calls superclass method
# File lib/eyemask/liquid/note.rb, line 9 def initialize(tag_name, markup, tokens) super params = markup.split(" ") @note_class = params.first @note_data = params.drop(1).join(" ") end
Public Instance Methods
render(context)
click to toggle source
Calls superclass method
# File lib/eyemask/liquid/note.rb, line 16 def render(context) content = MARKDOWN.render(::Liquid::Template.parse(super).render(context.registers)) "<aside class=\"note note-#{@note_class}\" data-note=\"#{@note_data}\">#{content}</aside>" end