class NoteTagger::NoteTag
Public Class Methods
new(tag_name, markup, tokens)
click to toggle source
Calls superclass method
# File lib/thought_tag.rb, line 23 def initialize(tag_name, markup, tokens) @markup = markup super end
Public Instance Methods
render(context)
click to toggle source
# File lib/thought_tag.rb, line 28 def render(context) site = context.registers[:site] converter = site.find_converter_instance(::Jekyll::Converters::Markdown) markup = converter.convert(@markup).strip[3..-1] result = "<div class=\"alert alert-note\" role=\"alert\">" result << "<p><span><strong>Note: </strong></span>#{markup}</div>" end