(Grav GitSync) Automatic Commit from smokephil

This commit is contained in:
smokephil 2025-01-17 09:13:21 +01:00 committed by GitSync
parent 88e07926d9
commit 9d9feba04b
144 changed files with 7311 additions and 5467 deletions

View file

@ -180,6 +180,20 @@ abstract class AbstractHeader implements HeaderInterface
$tokens[] = $encodedToken;
}
foreach ($tokens as $i => $token) {
// whitespace(s) between 2 encoded tokens
if (
0 < $i
&& isset($tokens[$i + 1])
&& preg_match('~^[\t ]+$~', $token)
&& $this->tokenNeedsEncoding($tokens[$i - 1])
&& $this->tokenNeedsEncoding($tokens[$i + 1])
) {
$tokens[$i - 1] .= $token.$tokens[$i + 1];
array_splice($tokens, $i, 2);
}
}
return $tokens;
}