Fix regex pattern in @octokit/request files for correct operator precedence

This commit is contained in:
Mardav Wala
2025-08-15 16:48:23 +00:00
parent 76d5f294e7
commit 974ac589f3

View File

@@ -24,7 +24,7 @@ for (const filePath of filesToFix) {
const originalContent = content
// Fix the problematic regex pattern - replace the end anchor version with the fixed version
content = content.replace(/charset=utf-8\$\//g, 'charset=utf-8/')
content = content.replace(/^text\/|charset=utf-8$\//g, '/^(text\/|charset=utf-8)$/')
if (content !== originalContent) {
fs.writeFileSync(filePath, content, 'utf8')