From 9787f42f9819648be9335eaa4a53fe8c29612593 Mon Sep 17 00:00:00 2001 From: Aaron Powell Date: Wed, 2 Jul 2025 09:14:25 +1000 Subject: [PATCH] Better encoding --- update-readme.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/update-readme.js b/update-readme.js index fc777e1..c87c84c 100755 --- a/update-readme.js +++ b/update-readme.js @@ -177,7 +177,7 @@ function generateReadme() { for (const file of instructionFiles) { const filePath = path.join(instructionsDir, file); const title = extractTitle(filePath); - const link = `instructions/${file}`.replace(/ /g, "%20"); + const link = encodeURI(`instructions/${file}`); // Check if there's a description in the frontmatter const customDescription = extractDescription(filePath); @@ -237,7 +237,7 @@ function generateReadme() { const filePath = path.join(promptsDir, file); const title = extractTitle(filePath); const description = extractDescription(filePath); - const link = `prompts/${file}`.replace(/ /g, "%20"); + const link = encodeURI(`prompts/${file}`); if (description) { newPromptsContent += `- [${title}](${link}) - ${description}\n`; @@ -359,7 +359,7 @@ function generateReadme() { for (const file of chatmodeFiles) { const filePath = path.join(chatmodesDir, file); const title = extractTitle(filePath); - const link = `chatmodes/${file}`.replace(/ /g, "%20"); + const link = encodeURI(`chatmodes/${file}`); // Check if there's a description in the frontmatter const customDescription = extractDescription(filePath);