Skip to content

Commit

Permalink
Don't use octal escape sequences in regression
Browse files Browse the repository at this point in the history
TypeScript doesn't all octal escape sequences anymore. Use hex representation instead.
  • Loading branch information
cmoesel committed Aug 26, 2024
1 parent c3cb05b commit 4023798
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions regression/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -499,9 +499,9 @@ async function generateDiff(
// diffString returns console control characters, so convert those to useful html tags
function prepareJsonChunk(jsonChunk: string): string {
return jsonChunk
.replace(/\033\[32m/g, '<span class="plus">')
.replace(/\033\[31m/g, '<span class="minus">')
.replace(/\033\[39m/g, '</span>');
.replace(/\x1b\[32m/g, '<span class="plus">')
.replace(/\x1b\[31m/g, '<span class="minus">')
.replace(/\x1b\[39m/g, '</span>');
}

async function getFilesRecursive(dir: string): Promise<string[]> {
Expand Down

0 comments on commit 4023798

Please sign in to comment.