1
0
mirror of https://github.com/erusev/parsedown.git synced 2023-08-10 21:13:06 +03:00

Headers can't start with more than three spaces

This commit is contained in:
Aidan Woods 2019-01-22 21:20:04 +00:00
parent 3d41f270c2
commit 81a2050608
No known key found for this signature in database
GPG Key ID: 9A6A8EFAA512BBB9

View File

@ -42,6 +42,10 @@ final class Header implements Block
Block $Block = null, Block $Block = null,
State $State = null State $State = null
) { ) {
if ($Context->line()->indent() > 3) {
return null;
}
$State = $State ?: new State; $State = $State ?: new State;
$level = \strspn($Context->line()->text(), '#'); $level = \strspn($Context->line()->text(), '#');