Sha256: 8a366222009d9fbf2fb9f8f202bd9fc63d9a1f0a080ad81712beb8e61a8926b3
Contents?: true
Size: 591 Bytes
Versions: 7
Compression:
Stored size: 591 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"] cite = node["cite"] attrs = cite ? "[quote, #{cite}]\n" : "" content = treat_children(node, state).strip content = ReverseAdoc.cleaner.remove_newlines(content) "\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
7 entries across 7 versions & 1 rubygems