Class: Slaw::Grammars::Tables::TableLine
- Inherits:
-
Treetop::Runtime::SyntaxNode
- Object
- Treetop::Runtime::SyntaxNode
- Slaw::Grammars::Tables::TableLine
- Defined in:
- lib/slaw/grammars/tables_nodes.rb
Instance Method Summary collapse
-
#to_xml(b, i, tail) ⇒ Object
line of table content.
Instance Method Details
#to_xml(b, i, tail) ⇒ Object
line of table content
61 62 63 64 65 66 67 68 69 70 |
# File 'lib/slaw/grammars/tables_nodes.rb', line 61 def to_xml(b, i, tail) inline_items.to_xml(b) unless inline_items.empty? # add trailing newlines. # for the first line, eat whitespace at the start # for the last line, eat whitespace at the end if not tail and (i > 0 or not inline_items.empty?) eol.text_value.count("\n").times { b.eol } end end |