fix(log): preserve leading whitespace in logs (#7879)

This commit is contained in:
Aleksander Lis 2026-01-05 21:32:34 +01:00 committed by GitHub
parent c406afddaf
commit 7c075551ff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -435,7 +435,7 @@ class="text-gray-500 dark:text-gray-400 py-2">
// Parse timestamp from log line (ISO 8601 format: 2025-12-04T11:48:39.136764033Z)
$timestamp = '';
$logContent = $line;
if (preg_match('/^(\d{4})-(\d{2})-(\d{2})T(\d{2}:\d{2}:\d{2})(?:\.(\d+))?Z?\s*(.*)$/', $line, $matches)) {
if (preg_match('/^(\d{4})-(\d{2})-(\d{2})T(\d{2}:\d{2}:\d{2})(?:\.(\d+))?Z?\s(.*)$/', $line, $matches)) {
$year = $matches[1];
$month = $matches[2];
$day = $matches[3];