Sha256: aa298cd64c1ac5dd594aafe871eb4c8e199d61393c39f9f98a0880a5d5a5c978
Contents?: true
Size: 694 Bytes
Versions: 10
Compression:
Stored size: 694 Bytes
Contents
# frozen_string_literal: true module Stepmod module Utils module Converters class Blockquote < ReverseAdoc::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
10 entries across 10 versions & 1 rubygems