Class: Marker::Paragraph
- Inherits:
-
RecursiveList
- Object
- Treetop::Runtime::SyntaxNode
- ParseNode
- RecursiveList
- Marker::Paragraph
- Defined in:
- lib/marker/text.rb
Instance Method Summary collapse
- #to_html(options = {}) ⇒ Object
-
#to_s(options = {}) ⇒ Object
TODO: add wordwrap.
Methods inherited from RecursiveList
Methods inherited from Treetop::Runtime::SyntaxNode
Instance Method Details
#to_html(options = {}) ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/marker/text.rb', line 11 def to_html( = {} ) '<p>' + to_a.map { |p| p.to_html() }.join(' ') + '</p>' end |
#to_s(options = {}) ⇒ Object
TODO: add wordwrap
20 21 22 23 24 |
# File 'lib/marker/text.rb', line 20 def to_s( = {} ) to_a.map { |p| p.to_s() }.join(' ') end |