Render results as a HTML string

Property definitions

nitc :: html_commands $ DocCommand :: to_html
	# Render results as a HTML string
	fun to_html: Writable do return "<p class='text-danger'>Not yet implemented</p>"
src/doc/templates/html_commands.nit:31,2--32,81

nitc :: html_commands $ CmdEntity :: to_html
	redef fun to_html do
		var mentity = self.mentity
		if mentity == null then return ""
		return mentity.html_link.write_to_string
	end
src/doc/templates/html_commands.nit:52,2--56,4

nitc :: html_commands $ CmdCode :: to_html
	redef fun to_html do
		var node = self.node
		if node == null then return ""

		var code = render_code(node)
		return "<pre>{code.write_to_string}</pre>"
	end
src/doc/templates/html_commands.nit:131,2--137,4

nitc :: html_commands $ CmdGraph :: to_html
	redef fun to_html do
		var output = render
		if output == null then return ""
		return output.write_to_string
	end
src/doc/templates/html_commands.nit:209,2--213,4

nitc :: html_commands $ CmdEntities :: to_html
	redef fun to_html do
		var mentities = self.results
		if mentities == null then return ""

		var tpl = new Template
		tpl.add "<ul>"
		for mentity in mentities do
			var mdoc = mentity.mdoc_or_fallback
			tpl.add "<li>"
			tpl.add mentity.html_link
			if mdoc != null then
				tpl.add " - "
				tpl.add mdoc.html_synopsis
			end
			tpl.add "</li>"
		end
		tpl.add "</ul>"
		return tpl.write_to_string
	end
src/doc/templates/html_commands.nit:60,2--78,4

nitc :: html_commands $ CmdComment :: to_html
	redef fun to_html do
		var mentity = self.mentity
		if mentity == null then return ""

		var mdoc = self.mdoc
		var tpl = new Template
		tpl.add "<h3>"
		# FIXME comments left here until I figure out what to do about the presentation options
		# if not opts.has_key("no-link") then
			tpl.add mentity.html_link
		# end
		if mdoc != null then
			# if not opts.has_key("no-link") and not opts.has_key("no-synopsis") then
				tpl.add " - "
			# end
			# if not opts.has_key("no-synopsis") then
				tpl.add mdoc.html_synopsis
			# end
		end
		tpl.add "</h3>"
		if mdoc != null then
			# if not opts.has_key("no-comment") then
				tpl.add mdoc.html_comment
			# end
		end
		return tpl.write_to_string
	end
src/doc/templates/html_commands.nit:82,2--108,4

nitc :: html_commands $ CmdEntityFile :: to_html
	redef fun to_html do
		var file = self.file
		if file == null then return ""

		return "<a href=\"{file_url or else ""}\">{file.basename}</a>"
	end
src/doc/templates/html_commands.nit:288,2--293,4

nitc :: html_commands $ CmdMainCompile :: to_html
	redef fun to_html do
		var command = self.command
		if command == null then return ""

		return "<pre>{command}</pre>"
	end
src/doc/templates/html_commands.nit:312,2--317,4

nitc :: html_commands $ CmdIniDescription :: to_html
	redef fun to_html do
		var desc = self.desc
		if desc == null then return ""

		return "<p>{desc}</p>"
	end
src/doc/templates/html_commands.nit:219,2--224,4

nitc :: html_commands $ CmdIniGitUrl :: to_html
	redef fun to_html do
		var url = self.url
		if url == null then return ""

		return "<a href=\"{url}\">{url}</a>"
	end
src/doc/templates/html_commands.nit:228,2--233,4

nitc :: html_commands $ CmdIniIssuesUrl :: to_html
	redef fun to_html do
		var url = self.url
		if url == null then return ""

		return "<a href=\"{url}\">{url}</a>"
	end
src/doc/templates/html_commands.nit:246,2--251,4

nitc :: html_commands $ CmdIniMaintainer :: to_html
	redef fun to_html do
		var name = self.maintainer
		if name == null then return ""

		return "<b>{name.html_escape}</b>"
	end
src/doc/templates/html_commands.nit:255,2--260,4

nitc :: html_commands $ CmdIniContributors :: to_html
	redef fun to_html do
		var names = self.contributors
		if names == null or names.is_empty then return ""

		var tpl = new Template
		tpl.add "<ul>"
		for name in names do
			tpl.add "<li><b>{name.html_escape}</b></li>"
		end
		tpl.add "</ul>"
		return tpl.write_to_string
	end
src/doc/templates/html_commands.nit:264,2--275,4

nitc :: html_commands $ CmdIniLicense :: to_html
	redef fun to_html do
		var license = self.license
		if license == null then return ""

		return "<a href=\"https://opensource.org/licenses/{license}\">{license}</a>"
	end
src/doc/templates/html_commands.nit:279,2--284,4

nitc :: html_commands $ CmdEntityFileContent :: to_html
	redef fun to_html do
		var content = self.content
		if content == null then return ""

		return "<pre>{content}</pre>"
	end
src/doc/templates/html_commands.nit:297,2--302,4

nitc :: html_commands $ CmdManSynopsis :: to_html
	redef fun to_html do
		var synopsis = self.synopsis
		if synopsis == null then return ""

		return "<pre>{synopsis}</pre>"
	end
src/doc/templates/html_commands.nit:321,2--326,4

nitc :: html_commands $ CmdManOptions :: to_html
	redef fun to_html do
		var options = self.options
		if options == null or options.is_empty then return ""

		var tpl = new Template
		tpl.addn "<pre>"
		tpl.addn "<table width='100%'>"
		for opt, desc in options do
			tpl.addn "<tr>"
			tpl.addn "<th valign='top' width='30%'>{opt}</th>"
			tpl.addn "<td width='70%'>{desc}</td>"
			tpl.addn "</tr>"
		end
		tpl.addn "</table>"
		tpl.addn "</pre>"

		return tpl.write_to_string
	end
src/doc/templates/html_commands.nit:330,2--347,4

nitc :: html_commands $ CmdIniCloneCommand :: to_html
	redef fun to_html do
		var command = self.command
		if command == null then return ""

		return "<pre>{command}</pre>"
	end
src/doc/templates/html_commands.nit:237,2--242,4

nitc :: html_commands $ CmdFeatures :: to_html
	redef fun to_html do return super
src/doc/templates/html_commands.nit:181,2--34

nitc :: html_commands $ CmdNew :: to_html
	redef fun to_html do return super
src/doc/templates/html_commands.nit:191,2--34

nitc :: html_commands $ CmdCall :: to_html
	redef fun to_html do return super
src/doc/templates/html_commands.nit:195,2--34

nitc :: html_commands $ CmdReturn :: to_html
	redef fun to_html do return super
src/doc/templates/html_commands.nit:199,2--34

nitc :: html_commands $ CmdParam :: to_html
	redef fun to_html do return super
src/doc/templates/html_commands.nit:203,2--34

nitc :: html_commands $ CmdMains :: to_html
	redef fun to_html do return super
src/doc/templates/html_commands.nit:308,2--34

nitc :: html_commands $ CmdTesting :: to_html
	redef fun to_html do
		var command = self.command
		if command == null then return ""

		return "<pre>{command}</pre>"
	end
src/doc/templates/html_commands.nit:351,2--356,4

nitc :: html_commands $ CmdAncestors :: to_html
	redef fun to_html do return super
src/doc/templates/html_commands.nit:165,2--34

nitc :: html_commands $ CmdParents :: to_html
	redef fun to_html do return super
src/doc/templates/html_commands.nit:169,2--34

nitc :: html_commands $ CmdChildren :: to_html
	redef fun to_html do return super
src/doc/templates/html_commands.nit:173,2--34

nitc :: html_commands $ CmdDescendants :: to_html
	redef fun to_html do return super
src/doc/templates/html_commands.nit:177,2--34

nitc :: html_commands $ CmdLinearization :: to_html
	redef fun to_html do return super
src/doc/templates/html_commands.nit:185,2--34