From 2eaf5f8014ced0ea5cff65782646fe209bf8dc2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Thu, 6 Dec 2018 13:17:25 +0100 Subject: Add a link on the line number in cover output This will make it easier to send links to other people. --- lib/tools/priv/styles.css | 4 ++++ lib/tools/src/cover.erl | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/tools/priv/styles.css b/lib/tools/priv/styles.css index e10e94e3ad..d4e3d79596 100644 --- a/lib/tools/priv/styles.css +++ b/lib/tools/priv/styles.css @@ -53,10 +53,12 @@ table thead { display: none; } table td.line, +table td.line a, table td.hits { width: 20px; background: #eaeaea; text-align: center; + text-decoration: none; font-size: 11px; padding: 0 10px; color: #949494; @@ -68,6 +70,7 @@ table td.hits { background-color: #f0f0f0; } tr.miss td.line, +tr.miss td.line a, tr.miss td.hits { background-color: #ffdce0; border-color: #fdaeb7; @@ -76,6 +79,7 @@ tr.miss td { background-color: #ffeef0; } tr.hit td.line, +tr.hit td.line a, tr.hit td.hits { background-color: #cdffd8; border-color: #bef5cb; diff --git a/lib/tools/src/cover.erl b/lib/tools/src/cover.erl index d7269e3f27..4f3707d2ed 100644 --- a/lib/tools/src/cover.erl +++ b/lib/tools/src/cover.erl @@ -2563,8 +2563,9 @@ table_row(Line, L) -> table_data(Line, L, N) -> LineNoNL = Line -- "\n", ["", + "", integer_to_list(L), - "\n", + "\n", "",maybe_integer_to_list(N),"\n", "",LineNoNL,"\n\n"]. -- cgit v1.2.3