Module: RbbCode::ListItemNode

Includes:
RecursiveConversion
Defined in:
lib/rbbcode/node_extensions.rb

Instance Method Summary collapse

Methods included from RecursiveConversion

#recursively_convert

Instance Method Details

#to_htmlObject



134
135
136
137
138
# File 'lib/rbbcode/node_extensions.rb', line 134

def to_html
  # Convert the :contents child node (defined in the .treetop file)
  # and wrap the result in <li> tags.
  "\n<li>" + recursively_convert(contents, :to_html) + "</li>\n"
end

#to_markdownObject



140
141
142
143
144
# File 'lib/rbbcode/node_extensions.rb', line 140

def to_markdown
  # Convert the :contents child node (defined in the .treetop file)
  # and add * characters.
  "* " + recursively_convert(contents, :to_html) + "\n"
end