class ReverseAsciidoctor::Converters::Blockquote

Public Instance Methods

convert(node, state = {}) click to toggle source
# File lib/reverse_asciidoctor/converters/blockquote.rb, line 4
def convert(node, state = {})
  id = node['id']
  anchor = id ? "[[#{id}]]\n" : ""
  cite = node['cite']
  attrs = cite ? "[quote, #{cite}]\n" : ""
  content = treat_children(node, state).strip
  content = ReverseAsciidoctor.cleaner.remove_newlines(content)
  #"\n\n> " << content.lines.to_a.join('> ') << "\n\n"
  "\n\n#{attrs}____\n" << content.lines.to_a.join('') << "\n____\n\n"
end