Sha256: a1b9c30e89a55617e3fa34b5948d81d56be383723440bb1d3f86a2b36d6cc13e

Contents?: true

Size: 418 Bytes

Versions: 3

Compression:

Stored size: 418 Bytes

Contents

module Hemingway

  module QuoteNode
    def html(block_content)
      Build.tag("blockquote", block_content.html)
    end
  end

  module QuoteEntryNode
    def html
      elements.map { |e| e.html }.join
    end
  end

  module QuoteParagraphNode
    def html
      paragraph_content = sequence.elements.map do |element|
        element.html
      end.join

      Build.tag("p", paragraph_content)
    end
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
hemingway-1.0.0 lib/hemingway/block/quote/quote_nodes.rb
hemingway-0.0.3 lib/hemingway/block/quote/quote_nodes.rb
hemingway-0.0.2 lib/hemingway/block/quote/quote_nodes.rb