Class: HamdownCore::Ast::HtmlListItem

Inherits:
BaseText
  • Object
show all
Defined in:
lib/hamdown_core/ast.rb

Direct Known Subclasses

HtmlOlListItem, HtmlUlListItem

Instance Attribute Summary

Attributes inherited from BaseText

#escape_html, #filename, #lineno, #text

Instance Method Summary collapse

Methods inherited from BaseText

#initialize, #to_h

Constructor Details

This class inherits a constructor from HamdownCore::Ast::BaseText

Instance Method Details

#html_list_item?Boolean

Returns:

  • (Boolean)


191
192
193
# File 'lib/hamdown_core/ast.rb', line 191

def html_list_item?
  true
end

#markdownable?Boolean

Returns:

  • (Boolean)


194
195
196
# File 'lib/hamdown_core/ast.rb', line 194

def markdownable?
  false
end

#to_ol_list_item!Object



197
198
199
200
201
202
203
# File 'lib/hamdown_core/ast.rb', line 197

def to_ol_list_item!
  node = HtmlOlListItem.new
  node.filename = filename
  node.lineno = lineno
  node.text = text
  node
end

#to_ul_list_item!Object



204
205
206
207
208
209
210
# File 'lib/hamdown_core/ast.rb', line 204

def to_ul_list_item!
  node = HtmlUlListItem.new
  node.filename = filename
  node.lineno = lineno
  node.text = text
  node
end