Sha256: 818cf80e23c1471540246aa436f06e6f77b99722a9d01ba0d23a70947e5fced9
Contents?: true
Size: 698 Bytes
Versions: 6
Compression:
Stored size: 698 Bytes
Contents
# frozen_string_literal: true module Stepmod module Utils module Converters class Blockquote < Stepmod::Utils::Converters::Base 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 = ReverseAdoc.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 end ReverseAdoc::Converters.register :blockquote, Blockquote.new end end end
Version data entries
6 entries across 6 versions & 1 rubygems