Module: Coradoc::Parser::Asciidoc::Table
Instance Method Summary collapse
- #cell_content ⇒ Object
- #empty_cell_content ⇒ Object
-
#table ⇒ Object
include Coradoc::Parser::Asciidoc::Base.
- #table_row ⇒ Object
Instance Method Details
#cell_content ⇒ Object
26 27 28 |
# File 'lib/coradoc/parser/asciidoc/table.rb', line 26 def cell_content str("|").absent? >> literal_space? >> rich_texts.as(:text) end |
#empty_cell_content ⇒ Object
22 23 24 |
# File 'lib/coradoc/parser/asciidoc/table.rb', line 22 def empty_cell_content str("|").absent? >> literal_space.as(:text) end |
#table ⇒ Object
include Coradoc::Parser::Asciidoc::Base
7 8 9 10 11 12 13 14 15 |
# File 'lib/coradoc/parser/asciidoc/table.rb', line 7 def table block_id.maybe >> (attribute_list >> newline).maybe >> block_title.maybe >> (attribute_list >> newline).maybe >> str("|===") >> line_ending >> table_row.repeat(1).as(:rows) >> str("|===") >> line_ending end |
#table_row ⇒ Object
17 18 19 20 |
# File 'lib/coradoc/parser/asciidoc/table.rb', line 17 def table_row (literal_space? >> str("|") >> (cell_content | empty_cell_content)) .repeat(1).as(:cols) >> line_ending end |