Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
end
return tpl.write_to_string
end
end
return tpl.write_to_string
end
+
+ redef fun render_comment do
+ var mdoc = self.mdoc
+ if mdoc == null then return null
+
+ if format == "html" then
+ if full_doc then return mdoc.html_documentation
+ return mdoc.html_synopsis
+ end
+ return super
+ end
end
redef class CmdEntityLink
end
redef class CmdEntityLink
end
return tpl.write_to_string
end
end
return tpl.write_to_string
end
+
+ redef fun render_comment do
+ var mdoc = self.mdoc
+ if mdoc == null then return null
+
+ if format == "md" then
+ if full_doc then return mdoc.md_documentation
+ return mdoc.md_synopsis
+ end
+ return super
+ end
end
redef class CmdEntityLink
end
redef class CmdEntityLink
import modelize
import modelbuilder
import htmlight
import modelize
import modelbuilder
import htmlight
# Retrieve the MDoc related to a MEntity
class CmdComment
# Retrieve the MDoc related to a MEntity
class CmdComment
# Format to render the comment
#
# Format to render the comment
#
- # Can be one of `raw` or `html`.
+ # Can be one of `raw`, `html` or `md`.
# Default is `raw`.
var format = "raw" is optional, writable
# Default is `raw`.
var format = "raw" is optional, writable
var mdoc = self.mdoc
if mdoc == null then return null
var mdoc = self.mdoc
if mdoc == null then return null
- if format == "html" then
- if full_doc then return mdoc.html_documentation
- return mdoc.html_synopsis
- end
if full_doc then return mdoc.documentation
return mdoc.synopsis
end
if full_doc then return mdoc.documentation
return mdoc.synopsis
end