mirror of
https://github.com/openai/codex.git
synced 2026-09-16 12:13:30 +00:00
fix: remember to set lastIndex = 0 on shared RegExp
This commit is contained in:
@@ -330,6 +330,7 @@ function rewriteFileCitations(
|
||||
return markdown;
|
||||
}
|
||||
|
||||
citationRegex.lastIndex = 0;
|
||||
return markdown.replace(citationRegex, (_match, file, start, _end) => {
|
||||
const absPath = path.resolve(cwd, file);
|
||||
const uri = `${fileOpener}://file${absPath}:${start}`;
|
||||
|
||||
Reference in New Issue
Block a user