2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-05 16:42:29 +03:00

Use Jekyll's markdownify filter instead of a custom plugin (#25319)

This commit is contained in:
m5o
2018-01-19 18:30:17 +01:00
committed by XhmikosR
parent ee4988164e
commit 0f53402fc0
5 changed files with 28 additions and 51 deletions
-20
View File
@@ -1,20 +0,0 @@
module Jekyll
class MarkdownBlock < Liquid::Block
alias_method :render_block, :render
def initialize(tag_name, markup, tokens)
super
end
# Uses the default Jekyll markdown parser to
# parse the contents of this block
#
def render(context)
site = context.registers[:site]
converter = site.find_converter_instance(::Jekyll::Converters::Markdown)
converter.convert(render_block(context))
end
end
end
Liquid::Template.register_tag('markdown', Jekyll::MarkdownBlock)