Render a HTML link for the MEntity location

Property definitions

nitc :: static_structure $ MEntity :: source_url
	# Render a HTML link for the MEntity location
	private fun source_url(url_pattern: nullable String): String do
		var location = self.location
		var file = location.file

		if file == null then return location.to_s
		if url_pattern == null then return file.filename.simplify_path

		var url = url_pattern
		url = url.replace("%f", file.filename.simplify_path)
		url = url.replace("%l", location.line_start.to_s)
		url = url.replace("%L", location.line_end.to_s)
		return url.simplify_path
	end
src/doc/static/static_structure.nit:425,2--438,4