mirror of
https://github.com/github/awesome-copilot.git
synced 2026-02-23 20:05:12 +00:00
Better encoding
This commit is contained in:
@@ -177,7 +177,7 @@ function generateReadme() {
|
|||||||
for (const file of instructionFiles) {
|
for (const file of instructionFiles) {
|
||||||
const filePath = path.join(instructionsDir, file);
|
const filePath = path.join(instructionsDir, file);
|
||||||
const title = extractTitle(filePath);
|
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
|
// Check if there's a description in the frontmatter
|
||||||
const customDescription = extractDescription(filePath);
|
const customDescription = extractDescription(filePath);
|
||||||
@@ -237,7 +237,7 @@ function generateReadme() {
|
|||||||
const filePath = path.join(promptsDir, file);
|
const filePath = path.join(promptsDir, file);
|
||||||
const title = extractTitle(filePath);
|
const title = extractTitle(filePath);
|
||||||
const description = extractDescription(filePath);
|
const description = extractDescription(filePath);
|
||||||
const link = `prompts/${file}`.replace(/ /g, "%20");
|
const link = encodeURI(`prompts/${file}`);
|
||||||
|
|
||||||
if (description) {
|
if (description) {
|
||||||
newPromptsContent += `- [${title}](${link}) - ${description}\n`;
|
newPromptsContent += `- [${title}](${link}) - ${description}\n`;
|
||||||
@@ -359,7 +359,7 @@ function generateReadme() {
|
|||||||
for (const file of chatmodeFiles) {
|
for (const file of chatmodeFiles) {
|
||||||
const filePath = path.join(chatmodesDir, file);
|
const filePath = path.join(chatmodesDir, file);
|
||||||
const title = extractTitle(filePath);
|
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
|
// Check if there's a description in the frontmatter
|
||||||
const customDescription = extractDescription(filePath);
|
const customDescription = extractDescription(filePath);
|
||||||
|
|||||||
Reference in New Issue
Block a user