Sha256: af4ad60547d224c2f32374042e663b2b06f4bdc2f95163788bd8c4cc9c21e21c

Contents?: true

Size: 704 Bytes

Versions: 16

Compression:

Stored size: 704 Bytes

Contents

module Liquid
  class Markdown < DmCore::LiquidBlock
    include DmCore::LiquidHelper
    
    #------------------------------------------------------------------------------
    def render(context)
      markdown(super, safe: false)
    end

    def self.details
      { name: self.tag_name,
        summary: 'Process text with Markdown',
        category: 'structure',
        description: <<-END_OF_DESCRIPTION
Process the enclosed text with Markdown. Useful when your processing a page as HTML, but you would like to use
Markdown in certain sections.

~~~
{% markdown %}
  ...content
{% endmarkdown %}
~~~
END_OF_DESCRIPTION
      }
    end
  end

  Template.register_tag('markdown', Markdown)
  
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
dm_cms-4.2.3.10 app/liquid/tags/markdown.rb
dm_cms-4.2.3.9 app/liquid/tags/markdown.rb
dm_cms-4.2.3.8 app/liquid/tags/markdown.rb
dm_cms-4.2.3.7 app/liquid/tags/markdown.rb
dm_cms-4.2.3.6 app/liquid/tags/markdown.rb
dm_cms-4.2.3.5 app/liquid/tags/markdown.rb
dm_cms-4.2.3.4 app/liquid/tags/markdown.rb
dm_cms-4.2.3.3 app/liquid/tags/markdown.rb
dm_cms-4.2.3.2 app/liquid/tags/markdown.rb
dm_cms-4.2.3.1 app/liquid/tags/markdown.rb
dm_cms-4.2.3 app/liquid/tags/markdown.rb
dm_cms-4.2.2.3 app/liquid/tags/markdown.rb
dm_cms-4.2.2.2 app/liquid/tags/markdown.rb
dm_cms-4.2.2.1 app/liquid/tags/markdown.rb
dm_cms-4.2.2 app/liquid/tags/markdown.rb
dm_cms-4.2.1.5 app/liquid/tags/markdown.rb