Sha256: 2e2cf41824d961b67019c277f49bcb7c7518329e3f87986cdddc557fdb7e4e21

Contents?: true

Size: 595 Bytes

Versions: 34

Compression:

Stored size: 595 Bytes

Contents

module Jekyll
  class DivTag < Liquid::Block
    def render(context)
      content            = super

      <<-HTML.gsub(/^ +\|/, '')
        |<#{tag} class="#{@markup}">
        |  #{render_content context, content}
        |</#{tag}>
      HTML
    end

    def tag
      @tag_name.split('_').first
    end

    def render_content(context, content)
      context.registers[:site].converters.find { |c| c.is_a? Jekyll::Converters::Markdown }.convert(content)
    end
  end
end

Liquid::Template.register_tag('div_tag', Jekyll::DivTag)
Liquid::Template.register_tag('span_tag', Jekyll::DivTag)

Version data entries

34 entries across 34 versions & 2 rubygems

Version Path
dynflow-0.8.16 doc/pages/plugins/div_tag.rb
dynflow-0.8.15 doc/pages/plugins/div_tag.rb
dynflow-0.8.14 doc/pages/plugins/div_tag.rb
dynflow-0.8.13 doc/pages/plugins/div_tag.rb
dynflow-0.8.12 doc/pages/plugins/div_tag.rb
dynflow-0.8.11 doc/pages/plugins/div_tag.rb
dynflow-0.8.10 doc/pages/plugins/div_tag.rb
foreman_remote_execution-0.2.3 doc/plugins/div_tag.rb
foreman_remote_execution-0.2.2 doc/plugins/div_tag.rb
foreman_remote_execution-0.2.1 doc/plugins/div_tag.rb
foreman_remote_execution-0.1.2 doc/plugins/div_tag.rb
dynflow-0.8.9 doc/pages/plugins/div_tag.rb
dynflow-0.8.8 doc/pages/plugins/div_tag.rb
foreman_remote_execution-0.1.1 doc/plugins/div_tag.rb
foreman_remote_execution-0.1.0 doc/plugins/div_tag.rb
foreman_remote_execution-0.0.10 doc/plugins/div_tag.rb
foreman_remote_execution-0.0.8 doc/plugins/div_tag.rb
dynflow-0.8.7 doc/pages/plugins/div_tag.rb
foreman_remote_execution-0.0.7 doc/plugins/div_tag.rb
dynflow-0.8.6 doc/pages/plugins/div_tag.rb