From 873168a493a75d636cfd772d64f365972371bc0b Mon Sep 17 00:00:00 2001 From: kennytm Date: Fri, 14 Jul 2017 08:31:41 +0800 Subject: [PATCH] Some minor HTML template change. --- cargo-cov/res/templates/html/static/common.css | 2 ++ cargo-cov/res/templates/html/static/file.js | 2 ++ cargo-cov/res/templates/html/tera/file.html | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/cargo-cov/res/templates/html/static/common.css b/cargo-cov/res/templates/html/static/common.css index 5d67684..c8e6b01 100644 --- a/cargo-cov/res/templates/html/static/common.css +++ b/cargo-cov/res/templates/html/static/common.css @@ -70,6 +70,8 @@ a:hover { text-align: left; width: inherit; min-width: 20em; + max-width: 58em; + overflow-wrap: break-word; } #source { diff --git a/cargo-cov/res/templates/html/static/file.js b/cargo-cov/res/templates/html/static/file.js index cbded36..fb7709d 100644 --- a/cargo-cov/res/templates/html/static/file.js +++ b/cargo-cov/res/templates/html/static/file.js @@ -15,6 +15,8 @@ function highlight() { lineElement.className += ' highlighted'; if (lineElement.scrollIntoViewIfNeeded) { lineElement.scrollIntoViewIfNeeded(true); + } else if (lineElement.scrollIntoView) { + lineElement.scrollIntoView(true); } } }; diff --git a/cargo-cov/res/templates/html/tera/file.html b/cargo-cov/res/templates/html/tera/file.html index 5a256a2..b5466f0 100644 --- a/cargo-cov/res/templates/html/tera/file.html +++ b/cargo-cov/res/templates/html/tera/file.html @@ -109,7 +109,7 @@

functions

{% set fn_cls = "covered" %} {% endif %} - {{ f.name | demangle | escape }} + {{ f.name | demangle | escape | replace(from="::", to="::​") | replace(from=",", to=",​") }} {{ f.summary.entry_count }} {{ macros::coverage_percent_cell(value=f.summary.exit_count, total=f.summary.entry_count, fair=0, good=0) }} {{ macros::coverage_percent_cell(value=f.summary.blocks_executed, total=f.summary.blocks_count, fair=75, good=90) }}