nitc :: DocCommand :: to_md
# Render results as a Markdown string
fun to_md: Writable do return "**Not yet implemented**"
src/doc/templates/md_commands.nit:28,2--29,56
redef fun to_md do
var mentities = self.results
if mentities == null then return ""
var tpl = new Template
for mentity in mentities do
var mdoc = mentity.mdoc_or_fallback
tpl.add "* `{mentity}`"
if mdoc != null then
tpl.add " - "
tpl.add mdoc.synopsis
end
tpl.add "\n"
end
return tpl.write_to_string
end
src/doc/templates/md_commands.nit:57,2--72,4
redef fun to_md do
var mentity = self.mentity
if mentity == null then return ""
var mdoc = self.mdoc
var tpl = new Template
tpl.add "### `{mentity}`"
if mdoc != null then
tpl.add " - "
tpl.add mdoc.synopsis
end
tpl.add "\n"
if mdoc != null then
tpl.add mdoc.comment
end
return tpl.write_to_string
end
src/doc/templates/md_commands.nit:76,2--92,4