Module: Coradoc::Parser::Asciidoc::Paragraph
Instance Method Summary collapse
Instance Method Details
#paragraph ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/coradoc/parser/asciidoc/paragraph.rb', line 13 def paragraph ( block_id.maybe >> block_title.maybe >> (attribute_list >> newline).maybe >> (paragraph_text_line.repeat(1,1) >> any.absent? | (paragraph_text_line >> newline_single.as(:line_break)).repeat(1) >> (paragraph_text_line.repeat(1,1)).repeat(0,1) ).as(:lines) >> newline.repeat(0) ).as(:paragraph) end |
#paragraph_attributes ⇒ Object
25 26 27 28 29 |
# File 'lib/coradoc/parser/asciidoc/paragraph.rb', line 25 def paragraph_attributes str("[") >> keyword.as(:key) >> str("=") >> word.as(:value) >> str("]") >> newline end |
#paragraph_text_line ⇒ Object
6 7 8 9 10 11 |
# File 'lib/coradoc/parser/asciidoc/paragraph.rb', line 6 def paragraph_text_line (asciidoc_char_with_id.absent? | text_id ) >> literal_space? >> (text_formatted.as(:text) # >> ) | term | term2 end |