mirror of
https://github.com/github/awesome-copilot.git
synced 2026-02-23 03:45:13 +00:00
Fix formatting of description in code review instructions (#104)
Fixed handling of quotes in update-readme.js code
This commit is contained in:
@@ -230,7 +230,16 @@ function extractDescription(filePath) {
|
||||
/^description:\s*['"]?(.+?)['"]?$/
|
||||
);
|
||||
if (descriptionMatch) {
|
||||
return descriptionMatch[1];
|
||||
let description = descriptionMatch[1];
|
||||
|
||||
// Check if the description is wrapped in single quotes and handle escaped quotes
|
||||
const singleQuoteMatch = line.match(/^description:\s*'(.+)'$/);
|
||||
if (singleQuoteMatch) {
|
||||
// Replace escaped single quotes ('') with single quotes (')
|
||||
description = singleQuoteMatch[1].replace(/''/g, "'");
|
||||
}
|
||||
|
||||
return description;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user