[−][src]Function super_analyzer_core::results::handlebars_helpers::html_code
pub fn html_code(
h: &Helper,
_: &Registry,
_: &Context,
_: &mut RenderContext,
out: &mut dyn Output
) -> Result<(), RenderError>
Generates HTML code for affected code in a vulnerability.
For lines without vulnerable code, only the line plus the optional separator (by default <br>
)
will be rendered. For vulnerable lines, the following code will be generated:
<code class="vulnerable_line {{ criticality }}">{{ indent }}
<span class="line_body">{{ code }}</span></code>{{ line_separator }}
This enables easy styling of the code in templates.