1
0
mirror of https://github.com/tcgdex/cards-database.git synced 2025-05-04 16:42:10 +00:00

fix: url not valid

This commit is contained in:
Florian Bouillon 2025-05-04 00:17:36 +02:00
parent 5b1f0528db
commit 8a8602da96

View File

@ -282,11 +282,11 @@ function generateCommentBody(
if (item.status === "added") {
commentBody += `<details><summary> <strong>New card: ${fileName}</strong></summary>\n\n`;
commentBody += `**File:** [${item.file}](${fileUrl}) \n\n`;
commentBody += `**File:** [${encodeURI(item.file)}](${encodeURI(fileUrl)}) \n\n`;
commentBody += "</details>\n\n";
} else if (item.status === "removed") {
commentBody += `<details><summary>🗑️ <strong>Deleted card: ${fileName}</strong></summary>\n\n`;
commentBody += `**File:** [${item.file}](${fileUrl}) \n\n`;
commentBody += `**File:** [${encodeURI(item.file)}](${encodeURI(fileUrl)}) \n\n`;
commentBody += "</details>\n\n";
} else if (item.card) {
const langInfo = item.usedLanguage ? ` (found using ${item.usedLanguage})` : "";
@ -307,7 +307,7 @@ function generateCommentBody(
commentBody += "</details>\n\n";
} else if (item.error) {
commentBody += `<details><summary>⚠️ <strong>Error processing ${fileName}</strong></summary>\n\n`;
commentBody += `**File:** [${item.file}](${fileUrl}) \n`;
commentBody += `**File:** [${encodeURI(item.file)}](${encodeURI(fileUrl)}) \n\n`;
commentBody += `**Error:** ${item.error}\n\n`;
commentBody += "</details>\n\n";
}