Skip to content

Commit

Permalink
fix(results): fix copy markdown button
Browse files Browse the repository at this point in the history
fixed few issues in copy markdown support for results tables.

fixes: #577
  • Loading branch information
soyacz committed Jan 23, 2025
1 parent cb6722c commit 07afa40
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion frontend/TestRun/Components/ResultTable.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
const cells = Array.from(row.querySelectorAll("th, td"));
const markdownRow = cells
.map((cell) => {
let cellText = cell.innerText.trim();
let cellText = cell.innerText;
let link = "";
const linkElement = cell.querySelector("a");
Expand All @@ -70,6 +70,8 @@
link = buttonElement.getAttribute("data-link");
}
cellText = cellText.replace(/\|/g, "\\|");
cellText = cellText.replace(/\s+/g, " ").trim();
cellText = cellText.replace(/#/g, "#​");
if (link) {
Expand Down

0 comments on commit 07afa40

Please sign in to comment.