Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 7f37797

Browse filesBrowse files
bug #46106 [String] Fix ansi escape sequences regex (fancyweb)
This PR was merged into the 5.4 branch. Discussion ---------- [String] Fix ansi escape sequences regex | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | - | Tickets | - | License | MIT | Doc PR | - It doesn't change much but I think it's a mistake. `0x40-\x7E` means one character among `0`, `x` and `4` or one character from `0` to `~` (ascii range) but what is intended is one character from `@` to `~` (ascii range). Commits ------- a1c92c7 [String] Fix ansi escape sequences regex
2 parents c14d0a1 + a1c92c7 commit 7f37797
Copy full SHA for 7f37797

File tree

1 file changed

+1
-1
lines changed
Filter options

1 file changed

+1
-1
lines changed

‎src/Symfony/Component/String/AbstractUnicodeString.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/String/AbstractUnicodeString.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ public function width(bool $ignoreAnsiDecoration = true): int
492492
foreach (explode("\n", $s) as $s) {
493493
if ($ignoreAnsiDecoration) {
494494
$s = preg_replace('/(?:\x1B(?:
495-
\[ [\x30-\x3F]*+ [\x20-\x2F]*+ [0x40-\x7E]
495+
\[ [\x30-\x3F]*+ [\x20-\x2F]*+ [\x40-\x7E]
496496
| [P\]X^_] .*? \x1B\\\\
497497
| [\x41-\x7E]
498498
)|[\p{Cc}\x7F]++)/xu', '', $s);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.