Sha256: 5c284d1734c4fbe460b4739e0dd7efcae59c1f26eb707500f17d851611549250

Contents?: true

Size: 599 Bytes

Versions: 3

Compression:

Stored size: 599 Bytes

Contents

require "hemingway/block/quote/quote_nodes"

module Hemingway
  module Block
    grammar Quote

      rule quote_type
        "quote" <QuoteNode>
      end

      rule quote_entry
        ( quote_paragraph / quote_last_paragraph )* <QuoteEntryNode>
      end

      # This quote_paragraph / quote_last_paragraph business is the same pattern
      # I use with paragraph and last paragraph.
      rule quote_paragraph
        sequence:( content )* eop <QuoteParagraphNode>
      end

      rule quote_last_paragraph
        sequence:( content )+ eop? <QuoteParagraphNode>
      end

    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

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