class Jekyll::CodeTabs::CodeTabBlock

Public Class Methods

new(tag_name, markup, tokens) click to toggle source
Calls superclass method
# File lib/jekyll-code-tabs.rb, line 34
def initialize(tag_name, markup, tokens)
  super
  if markup == ""
    raise SyntaxError.new("No toggle name given in #{tag_name} tag")
  end
  @toggle = markup.strip
end

Public Instance Methods

render(context) click to toggle source
# File lib/jekyll-code-tabs.rb, line 42
def render(context)
  site = context.registers[:site]
  converter = site.find_converter_instance(::Jekyll::Converters::Markdown)
  environment = context.environments.first
  environment['codetabs'] ||= {}
  environment['codetabs'][@toggle] = converter.convert(render_block(context))
end
Also aliased as: render_block
render_block(context)
Alias for: render