markdown2 $ MdBlockQuoteParser :: BLOCK
Kind of block under constructionmarkdown2 $ MdBlockQuoteParser :: SELF
Type of this instance, automatically specialized in every classmarkdown2 $ MdBlockQuoteParser :: parse_inlines
Parseblock
lines
markdown2 $ MdBlockQuoteParser :: try_continue
Canself
continue from the current index
in parser
?
core :: Object :: class_factory
Implementation used byget_class
to create the specific class.
markdown2 :: MdBlockParser :: column_start=
Column startmarkdown2 :: 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
?
# Blockquotes parser
class MdBlockQuoteParser
super MdBlockParser
redef type BLOCK: MdBlockQuote
redef var block = new MdBlockQuote(location) is lazy
redef fun try_continue(state) do
var next_non_space = state.next_non_space_index
var indent = state.indent
var line = state.line_string
if indent >= 4 then return null
if next_non_space >= line.length then return null
if line.chars[next_non_space] != '>' then return null
var new_column = state.column + state.indent + 1
# optional following space or tab
if state.line_string.is_space_or_tab(next_non_space + 1) then
new_column += 1
end
return new MdBlockContinue.at_column(new_column)
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:720,1--751,3