Class: AsciidoctorVaped::Parser::Blocks::Paragraph

Inherits:
BaseNode
  • Object
show all
Defined in:
lib/asciidoctor_vaped/parser/blocks/paragraph.rb

Instance Method Summary collapse

Methods inherited from BaseNode

#handle, #initialize

Constructor Details

This class inherits a constructor from AsciidoctorVaped::Parser::Blocks::BaseNode

Instance Method Details

#match?(_context) ⇒ Boolean

Returns:

  • (Boolean)


9
10
11
# File 'lib/asciidoctor_vaped/parser/blocks/paragraph.rb', line 9

def match?(_context)
  true
end

#parse(context) ⇒ Object



13
14
15
16
# File 'lib/asciidoctor_vaped/parser/blocks/paragraph.rb', line 13

def parse(context)
  lines = context.reader.read_until_blank
  context.append AST::Element.new(:paragraph, children: Inline.parse(lines.join("\n")))
end