Class: Markbridge::AST::Table
- Defined in:
- lib/markbridge/ast/table.rb
Overview
Represents a table element containing rows.
Instance Attribute Summary
Attributes inherited from Element
Instance Method Summary collapse
-
#<<(child) ⇒ Object
HTML/BBCode parsers add a Text(“n”) child for the whitespace between ‘<table>` and `<tr>` (and equivalent BBCode).
Methods inherited from Element
Constructor Details
This class inherits a constructor from Markbridge::AST::Element
Instance Method Details
#<<(child) ⇒ Object
HTML/BBCode parsers add a Text(“n”) child for the whitespace between ‘<table>` and `<tr>` (and equivalent BBCode). Drop those so the AST contains only TableRow children.
14 15 16 17 18 |
# File 'lib/markbridge/ast/table.rb', line 14 def <<(child) return self if child.instance_of?(Text) && child.text.strip.empty? super end |