markdown2 :: MdListItemParser :: block=
markdown2 :: MdListItemParser :: content_indent=
List item content indendmarkdown2 $ MdListItemParser :: SELF
Type of this instance, automatically specialized in every classmarkdown2 $ MdListItemParser :: parse_inlines
Parseblock
lines
markdown2 $ MdListItemParser :: try_continue
Canself
continue from the current index
in parser
?
markdown2 :: MdListItemParser :: block=
core :: Object :: class_factory
Implementation used byget_class
to create the specific class.
markdown2 :: MdBlockParser :: column_start=
Column startmarkdown2 :: MdListItemParser :: content_indent=
List item content indendmarkdown2 :: MdBlockParser :: content_offset
Column where the content startsmarkdown2 :: MdBlockParser :: content_offset=
Column where the content startscore :: Object :: defaultinit
markdown2 :: MdBlockParser :: initialize
Initialize the currentblock
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 :: MdBlockParser :: location=
Location at startcore :: Object :: output_class_name
Display class name on stdout (debug only).markdown2 :: MdBlockParser :: parse_inlines
Parseblock
lines
markdown2 :: MdBlockParser :: try_continue
Canself
continue from the current index
in parser
?
# List items parser
class MdListItemParser
super MdBlockParser
redef type BLOCK: MdListItem
redef var block = new MdListItem(location) is lazy
# List item content indend
var content_indent: Int
redef fun try_continue(state) do
if state.is_blank then
if block.first_child == null then
# blank line after empty list item
return null
end
return new MdBlockContinue.at_index(state.next_non_space_index)
end
if state.indent >= content_indent then
return new MdBlockContinue.at_column(state.column + content_indent)
end
return null
end
redef fun parse_inlines(inline_parser) do
var last_child = block.last_child
if last_child != null then
location.line_end = last_child.location.line_end
location.column_end = last_child.location.column_end
end
end
end
lib/markdown2/markdown_block_parsing.nit:1144,1--1175,3