From 175e923d0de452106fdbee5fb67ea688c049e163 Mon Sep 17 00:00:00 2001 From: Urgau Date: Sun, 2 Nov 2025 22:12:45 +0100 Subject: [PATCH 1/2] Avoid trailing new-lines between each line of the table --- src/gha_logs.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gha_logs.rs b/src/gha_logs.rs index 72601e0a..cda84a87 100644 --- a/src/gha_logs.rs +++ b/src/gha_logs.rs @@ -275,14 +275,14 @@ body {{ html = html.replace(/^\uFEFF/gm, ""); // 3. Transform each log lines that doesn't start with a timestamp into a row where everything is in the second column - const untsRegex = /^(?!\d{{4}}-\d{{2}}-\d{{2}}T\d{{2}}:\d{{2}}:\d{{2}}\.\d+Z)(.*)$/gm; + const untsRegex = /^(?!\d{{4}}-\d{{2}}-\d{{2}}T\d{{2}}:\d{{2}}:\d{{2}}\.\d+Z)(.*)(\r?\n)?/gm; html = html.replace(untsRegex, (match, log) => `${{log}}` ); // 3.b Transform each log lines that start with a timestamp in a row with two columns and make the timestamp be a // self-referencial anchor. - const tsRegex = /^(\d{{4}}-\d{{2}}-\d{{2}}T\d{{2}}:\d{{2}}:\d{{2}}\.\d+Z) (.*)$/gm; + const tsRegex = /^(\d{{4}}-\d{{2}}-\d{{2}}T\d{{2}}:\d{{2}}:\d{{2}}\.\d+Z) (.*)(\r?\n)?/gm; html = html.replace(tsRegex, (match, ts, log) => `${{ts}}${{log}}` ); From b330745543f8636446b190b383a4429f6be6be48 Mon Sep 17 00:00:00 2001 From: Urgau Date: Sun, 2 Nov 2025 22:15:32 +0100 Subject: [PATCH 2/2] Avoid new-lines before and after our `` to take effect --- src/gha_logs.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gha_logs.rs b/src/gha_logs.rs index cda84a87..b619172c 100644 --- a/src/gha_logs.rs +++ b/src/gha_logs.rs @@ -216,7 +216,11 @@ body {{ font: 14px SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace; background: #0C0C0C; color: #CCC; +}} +table {{ white-space: pre; + table-layout: fixed; + width: 100%; }} .timestamp {{ color: #848484; @@ -358,7 +362,7 @@ body {{ -
+