X-Git-Url: http://nitlanguage.org diff --git a/src/highlight.nit b/src/highlight.nit index fbe013e..cd400bd 100644 --- a/src/highlight.nit +++ b/src/highlight.nit @@ -200,6 +200,22 @@ pre.nitcode .line:hover{ background-color: #FFFFE0; } /* current line */ .popover { max-width: 800px !important; } """ end + + # Additional content to inject in the tag + # Note: does not include `css_content`; handle it yourself. + fun head_content: String + do + return """\n""" + end + + # Additional content to inject just before the closing tag + fun foot_content: String + do + return """ + + +""" + end end redef class HTMLTag @@ -650,9 +666,9 @@ end redef class AVarFormExpr redef fun decorate_tag(v, res, token) do - res.add_class("nc_v") var variable = self.variable if variable == null then return null + res.add_class("nc_v") return variable.infobox(v) end end @@ -660,9 +676,9 @@ end redef class AVardeclExpr redef fun decorate_tag(v, res, token) do - res.add_class("nc_v") var variable = self.variable if variable == null then return null + res.add_class("nc_v") return variable.infobox(v) end end @@ -671,9 +687,9 @@ redef class AForExpr redef fun decorate_tag(v, res, token) do if not token isa TId then return null - res.add_class("nc_v") var vs = variables if vs == null then return null + res.add_class("nc_v") var idx = n_ids.index_of(token) var variable = vs[idx] return variable.infobox(v) @@ -683,11 +699,11 @@ end redef class AParam redef fun decorate_tag(v, res, token) do - res.add_class("nc_v") var mp = mparameter if mp == null then return null var variable = self.variable if variable == null then return null + res.add_class("nc_v") return variable.infobox(v) end end