markdown :: LineCode :: defaultinit
core :: Object :: class_factory
Implementation used byget_class
to create the specific class.
markdown :: Line :: defaultinit
markdown :: LineCode :: defaultinit
core :: Object :: defaultinit
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.
core :: Object :: output_class_name
Display class name on stdout (debug only).
# A line of markdown code.
class LineCode
super Line
redef fun process(v) do
var line = v.current_line
# lookup block end
while line != null and (line.is_empty or v.line_kind(line) isa LineCode) do
line = line.next
end
# split at block end line
var current_block = v.current_block.as(not null)
var block: MDBlock
if line != null then
block = current_block.split(line.prev.as(not null))
else
block = current_block.split(current_block.last_line.as(not null))
end
block.kind = new BlockCode(block)
block.remove_surrounding_empty_lines
v.current_line = current_block.first_line
end
end
lib/markdown/markdown.nit:1702,1--1724,3