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);