Tabs are allowed after header delimiter

This commit is contained in:
Aidan Woods 2019-01-22 21:34:46 +00:00
parent 81a2050608
commit 67231cbae1
No known key found for this signature in database
GPG Key ID: 9A6A8EFAA512BBB9

View File

@ -60,11 +60,14 @@ final class Header implements Block
$StrictMode = $State->getOrDefault(StrictMode::class);
if ($StrictMode->isEnabled() && isset($text[0]) and $text[0] !== ' ') {
if (
$StrictMode->isEnabled() && isset($text[0])
and $text[0] !== ' ' and $text[0] !== "\t"
) {
return null;
}
$text = \trim($text, ' ');
$text = \trim($text, " \t");
return new self($text, $level);
}