Skip to content

Commit ef0ae63

Browse files
committed
Merge branch '7.1' into 7.2
* 7.1: (31 commits) [DependencyInjection] Fix phpdoc for $calls [Security] check token in payload instead just request fix tests add missing method fix merge fix test fix merge fix test change test to use a real ObjectManager [Mailer] Document the usage of custom headers in Infobip bridge [SecurityBundle] Add `provider` XML attribute to the authenticators it’s missing from [DoctrineBridge] Test reset with a true manager Sync php-cs-fixer config file with 7.2 [HttpClient] Fix parsing SSE [Notifier] Fix thread key in GoogleChat bridge [HttpKernel][Security] Fix accessing session for stateless request [Serializer] Fix `ObjectNormalizer` with property path test handling of special "value" constraint option [PhpUnitBridge] Add missing import [FrameworkBundle] Fix setting default context for certain normalizers ...
2 parents 1053dd4 + 82b2224 commit ef0ae63

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Profiler/CodeExtension.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,10 @@ public function fileExcerpt(string $file, int $line, int $srcContext = 3): ?stri
126126
if (\PHP_VERSION_ID >= 80300) {
127127
// remove main pre/code tags
128128
$code = preg_replace('#^<pre.*?>\s*<code.*?>(.*)</code>\s*</pre>#s', '\\1', $code);
129-
// split multiline code tags
130-
$code = preg_replace_callback('#<code ([^>]++)>((?:[^<]*+\\n)++[^<]*+)</code>#', fn ($m) => "<code $m[1]>".str_replace("\n", "</code>\n<code $m[1]>", $m[2]).'</code>', $code);
131-
// Convert spaces to html entities to preserve indentation when rendered
132-
$code = str_replace(' ', '&nbsp;', $code);
129+
// split multiline span tags
130+
$code = preg_replace_callback('#<span ([^>]++)>((?:[^<\\n]*+\\n)++[^<]*+)</span>#', function ($m) {
131+
return "<span $m[1]>".str_replace("\n", "</span>\n<span $m[1]>", $m[2]).'</span>';
132+
}, $code);
133133
$content = explode("\n", $code);
134134
} else {
135135
// remove main code/span tags

0 commit comments

Comments
 (0)