diff --git a/_plugins/custom_blockquote.rb b/_plugins/custom_blockquote.rb new file mode 100644 index 0000000000..9cdaf9aacc --- /dev/null +++ b/_plugins/custom_blockquote.rb @@ -0,0 +1,7 @@ +class Kramdown::Converter::Html + # You can override any function from this page: + # https://kramdown.gettalong.org/rdoc/Kramdown/Converter/Html.html + def convert_blockquote(el, indent) + Jekyll::Quote.render_with_quotes(inner(el, indent)) + end +end diff --git a/_plugins/quote.rb b/_plugins/quote.rb index d88e2cedc9..597d11523f 100644 --- a/_plugins/quote.rb +++ b/_plugins/quote.rb @@ -1,20 +1,14 @@ module Jekyll - class Quote < Liquid::Tag + class Quote < Liquid::Block - ALLOWED_ATTRIBUTES = %w( - text - ).freeze - - def initialize(_, args, _) - super - @args = OptionParser.parse(args, ALLOWED_ATTRIBUTES) - raise 'Quote: "text" attribute must be provided' if @args[:attributes][:text].nil? + def render(context) + Jekyll::Quote.render_with_quotes(Kramdown::Document.new(super).to_html) end - def render(context) + def self.render_with_quotes(html_element) %{