blob: 7d60137d3b1e0c28f31da7408e4e52866004c0e4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
module Jekyll
class MarkdownBlock < Liquid::Block
def initialize(tag_name, text, tokens)
super
end
require "redcarpet"
def render(context)
content = super
"#{Redcarpet::Markdown.new(Redcarpet::Render::HTML).render(content)}"
end
end
end
Liquid::Template.register_tag('markdown', Jekyll::MarkdownBlock)
|