nitc :: CmdEntityLink :: defaultinit
# Get the link to a MEntity API documentation
class CmdEntityLink
super CmdEntity
# The link text to display
var text: nullable String = null is optional, writable
# The link title to display when the link is hovered
var title: nullable String = 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)
if text == null then
text = mentity.name
end
if title == null then
var mdoc = mentity.mdoc_or_fallback
if mdoc != null then
title = mdoc.synopsis
end
end
return res
end
end
src/doc/commands/commands_model.nit:87,1--113,3