diff --git a/src/gha_logs.rs b/src/gha_logs.rs index 72601e0a..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; @@ -275,14 +279,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}}` ); @@ -358,7 +362,7 @@ body {{ - +