Module: RbbCode::ListNode
- Includes:
- RecursiveConversion
- Defined in:
- lib/rbbcode/node_extensions.rb
Instance Method Summary collapse
Methods included from RecursiveConversion
Instance Method Details
#to_html(options) ⇒ Object
117 118 119 120 121 |
# File 'lib/rbbcode/node_extensions.rb', line 117 def to_html() # Convert the :contents child node (defined in the .treetop file) # and wrap the result in <ul> tags. "\n<ul>" + recursively_convert(items, :to_html, ) + "</ul>\n" end |
#to_markdown(options) ⇒ Object
123 124 125 126 127 128 |
# File 'lib/rbbcode/node_extensions.rb', line 123 def to_markdown() # Convert the :contents child node (defined in the .treetop file). # (Unlike with HTML, no outer markup needed.) Then append an extra # newline, for a total of two at the end. recursively_convert(items, :to_markdown, ) + "\n" end |