Class: Marker::Paragraph

Inherits:
RecursiveList show all
Defined in:
lib/marker/text.rb

Instance Method Summary collapse

Methods inherited from RecursiveList

#r, #to_a

Methods inherited from Treetop::Runtime::SyntaxNode

#present?

Instance Method Details

#to_html(options = {}) ⇒ Object



11
12
13
14
15
16
17
# File 'lib/marker/text.rb', line 11

def to_html( options = {} )
  '<p>' +
  to_a.map { |p|
    p.to_html(options)
  }.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( options = {} )
  to_a.map { |p|
    p.to_s(options)
  }.join(' ')
end