Better encoding

This commit is contained in:
Aaron Powell 2025-07-02 09:14:25 +10:00
parent fcfb4ccf02
commit 9787f42f98

View File

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