release: v4.6.1

This commit is contained in:
nuno maduro
2026-04-15 09:03:09 -07:00
parent 6ba373a772
commit 87db0b4847
10 changed files with 20 additions and 35 deletions

View File

@ -86,5 +86,12 @@ dataset('dataset_in_pest_file', ['A', 'B']);
function removeAnsiEscapeSequences(string $input): ?string
{
return preg_replace('#\\x1b[[][^A-Za-z]*[A-Za-z]#', '', $input);
return preg_replace(
[
'#\\x1b[[][^A-Za-z]*[A-Za-z]#', // CSI (colors, cursor, etc.)
'#\\x1b\\]8;[^\\x1b\\x07]*(?:\\x1b\\\\|\\x07)#', // OSC 8 hyperlinks
],
'',
$input,
);
}