nitc :: CmdSummary
List all MarkdownHeading found and their ids.
nitc :: CmdSummary :: _markdown_processor
Markdown processor used to parse the headlinesnitc :: CmdSummary :: defaultinit
nitc :: CmdSummary :: markdown_processor
Markdown processor used to parse the headlinesnitc :: CmdSummary :: markdown_processor=
Markdown processor used to parse the headlinesnitc $ CmdSummary :: SELF
Type of this instance, automatically specialized in every classnitc :: CmdSummary :: _markdown_processor
Markdown processor used to parse the headlinesnitc :: CmdEntity :: _mentity_name
Name of the mentity this command is aboutcore :: Object :: class_factory
Implementation used byget_class
to create the specific class.
nitc :: DocCommand :: cmd_filter
Return a new filter for that command execution.nitc :: CmdEntity :: defaultinit
nitc :: DocCommand :: defaultinit
nitc :: CmdSummary :: defaultinit
core :: Object :: defaultinit
nitc :: CmdComment :: defaultinit
nitc :: DocCommand :: execute
nitc :: DocCommand :: filter=
ModelFilter to apply if anynitc :: CmdComment :: full_doc=
Retrieve the full documentationnitc :: DocCommand :: http_init
Init the command from an HTTPRequestcore :: 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.
nitc :: CmdSummary :: markdown_processor
Markdown processor used to parse the headlinesnitc :: CmdSummary :: markdown_processor=
Markdown processor used to parse the headlinesnitc :: CmdEntity :: mentity_name
Name of the mentity this command is aboutnitc :: CmdEntity :: mentity_name=
Name of the mentity this command is aboutcore :: 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 :: DocCommand :: parser_init
Initialize the command from the CommandParser datanitc :: CmdComment :: render_comment
Rendermdoc
depending on full_doc
and format
nitc :: DocCommand :: to_json
Return a JSON Serializable representation ofself
results
# Retrieve the MDoc summary
#
# List all MarkdownHeading found and their ids.
class CmdSummary
super CmdComment
# Markdown processor used to parse the headlines
var markdown_processor: MarkdownProcessor is writable
# Resulting summary
#
# Associates each headline to its id.
var summary: nullable ArrayMap[String, HeadLine] = null is optional, writable
redef fun init_command do
var res = super
if not res isa CmdSuccess then return res
var mentity = self.mentity.as(not null)
var mdoc = self.mdoc
if mdoc == null then
mdoc = if fallback then mentity.mdoc_or_fallback else mentity.mdoc
self.mdoc = mdoc
end
if mdoc == null then return new WarningNoMDoc(mentity)
markdown_processor.process(mdoc.md_documentation.write_to_string)
var summary = new ArrayMap[String, HeadLine]
summary.add_all markdown_processor.decorator.headlines
self.summary = summary
return res
end
end
src/doc/commands/commands_docdown.nit:21,1--54,3