markdown2 :: MdListItem :: defaultinit
markdown2 $ MdListItem :: SELF
Type of this instance, automatically specialized in every classmarkdown2 $ MdListItem :: can_contain
Can this block containblock
?
markdown2 $ MdListItem :: is_container
Can this block contain other blocks?markdown2 $ MdListItem :: is_container=
Can this block contain other blocks?markdown2 :: markdown_html_rendering $ MdListItem :: render_html
Renderself
as HTML
markdown2 :: markdown_latex_rendering $ MdListItem :: render_latex
Renderself
as HTML
markdown2 :: markdown_md_rendering $ MdListItem :: render_md
Renderself
as Markdown
markdown2 :: MdBlock :: can_contain
Can this block containblock
?
core :: Object :: class_factory
Implementation used byget_class
to create the specific class.
markdown2 :: MdBlock :: defaultinit
markdown2 :: MdListItem :: defaultinit
core :: Object :: defaultinit
markdown2 :: MdNode :: defaultinit
markdown2 :: MdBlock :: is_container=
Can this block contain other blocks?core :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
markdown2 :: MdNode :: location=
Node location in original markdowncore :: Object :: output_class_name
Display class name on stdout (debug only).markdown2 :: MdNode :: post_process
Accept the visit of aMdPostProcessor
markdown2 :: MdNode :: render_raw_text
Renderself
as raw text
# An ordered or unordered list item block
class MdListItem
super MdBlock
redef var is_container = true
redef fun can_contain(block) do return true
end
lib/markdown2/markdown_ast.nit:302,1--309,3
redef class MdListItem
redef fun render_md(v) do
var parent = self.parent
var is_tight = parent.as(MdListBlock).is_tight
v.add_indent
if parent isa MdUnorderedList then
v.add_raw parent.bullet_marker.to_s
v.indent += 2
else if parent isa MdOrderedList then
v.add_raw "{parent.md_numbering}{parent.delimiter.to_s}"
v.indent += 3
end
var node = first_child
if node != null then
v.add_raw " "
else
v.add_line
end
while node != null do
v.enter_visit(node)
node = node.next
if node != null and not is_tight then
v.add_line
end
end
if next != null and not is_tight then
v.add_line
end
if parent isa MdUnorderedList then
v.indent -= 2
else if parent isa MdOrderedList then
parent.md_numbering += 1
v.indent -= 3
end
end
end
lib/markdown2/markdown_md_rendering.nit:180,1--219,3