@@ -177,7 +177,7 @@ function generateReadme() {
177177 for ( const file of instructionFiles ) {
178178 const filePath = path . join ( instructionsDir , file ) ;
179179 const title = extractTitle ( filePath ) ;
180- const link = `instructions/${ file } ` . replace ( / / g , "%20" ) ;
180+ const link = encodeURI ( `instructions/${ file } ` ) ;
181181
182182 // Check if there's a description in the frontmatter
183183 const customDescription = extractDescription ( filePath ) ;
@@ -237,7 +237,7 @@ function generateReadme() {
237237 const filePath = path . join ( promptsDir , file ) ;
238238 const title = extractTitle ( filePath ) ;
239239 const description = extractDescription ( filePath ) ;
240- const link = `prompts/${ file } ` . replace ( / / g , "%20" ) ;
240+ const link = encodeURI ( `prompts/${ file } ` ) ;
241241
242242 if ( description ) {
243243 newPromptsContent += `- [${ title } ](${ link } ) - ${ description } \n` ;
@@ -359,7 +359,7 @@ function generateReadme() {
359359 for ( const file of chatmodeFiles ) {
360360 const filePath = path . join ( chatmodesDir , file ) ;
361361 const title = extractTitle ( filePath ) ;
362- const link = `chatmodes/${ file } ` . replace ( / / g , "%20" ) ;
362+ const link = encodeURI ( `chatmodes/${ file } ` ) ;
363363
364364 // Check if there's a description in the frontmatter
365365 const customDescription = extractDescription ( filePath ) ;
0 commit comments