Fix formatting of description in code review instructions (#104)

Fixed handling of quotes in update-readme.js code
This commit is contained in:
Artem Saveliev
2025-07-16 21:56:59 -07:00
committed by GitHub
parent 0e31a96729
commit db0d47413a
3 changed files with 12 additions and 3 deletions

View File

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