Because inline comments can appear as span elements, InlineDecorator do not decorate things like paragraphs or headers.
nitc :: InlineDecorator :: defaultinit
nitc $ InlineDecorator :: SELF
Type of this instance, automatically specialized in every classnitc $ InlineDecorator :: add_headline
Render a headline block with corresponding level.nitc $ InlineDecorator :: add_paragraph
Render a paragraph block.nitc :: NitdocDecorator :: _current_mdoc
The currently processed mdoc.markdown :: HTMLDecorator :: _headlines
nitc :: NitdocDecorator :: _toolcontext
markdown :: Decorator :: add_blockquote
Render a blockquote.markdown :: Decorator :: add_headline
Render a headline block with corresponding level.markdown :: Decorator :: add_line_break
Render a line breakmarkdown :: Decorator :: add_listitem
Render a list item.markdown :: Decorator :: add_orderedlist
Render an ordered list.markdown :: Decorator :: add_paragraph
Render a paragraph block.markdown :: Decorator :: add_span_code
Render a code span reading from a buffer.markdown :: Decorator :: add_strike
Render a strike text.markdown :: Decorator :: add_strong
Render a strong text.markdown :: Decorator :: add_unorderedlist
Render an unordered list.markdown :: Decorator :: add_wikilink
Renders a[[wikilink]]
item.
markdown :: Decorator :: append_code
Render code text from buffer and escape it.markdown :: Decorator :: append_value
Render a text and escape it.core :: Object :: class_factory
Implementation used byget_class
to create the specific class.
nitc :: NitdocDecorator :: current_mdoc
The currently processed mdoc.nitc :: NitdocDecorator :: current_mdoc=
The currently processed mdoc.nitc :: NitdocDecorator :: defaultinit
markdown :: HTMLDecorator :: defaultinit
markdown :: Decorator :: defaultinit
nitc :: InlineDecorator :: defaultinit
core :: Object :: defaultinit
markdown :: Decorator :: escape_char
Render a character escape.markdown :: HTMLDecorator :: headlines=
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 :: native_class_name
The class name of the object in CString format.core :: Object :: output_class_name
Display class name on stdout (debug only).nitc :: NitdocDecorator :: toolcontext
nitc :: NitdocDecorator :: toolcontext=
InlineDecorator
but with wikilink commands handling
# Decorator for span elements.
#
# Because inline comments can appear as span elements,
# InlineDecorator do not decorate things like paragraphs or headers.
class InlineDecorator
super NitdocDecorator
redef fun add_paragraph(v, block) do
v.emit_in block
end
redef fun add_headline(v, block) do
# save headline
var line = block.block.first_line
if line == null then return
var txt = line.value
var id = strip_id(txt)
var lvl = block.depth
headlines[id] = new HeadLine(id, txt, lvl)
v.emit_in block
end
redef fun add_code(v, block) do
# Try to parse code
var ast = toolcontext.parse_something(block.block.text.to_s)
if ast isa AError then
v.add "<code>"
v.emit_in block
v.add "</code>"
return
end
v.add "<code class=\"nitcode\">"
var hl = new HtmlightVisitor
hl.highlight_node(ast)
v.add(hl.html)
v.add "</code>"
end
end
src/doc/templates/html_model.nit:514,1--552,3