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