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

Ensure markers are checked when beginning blocks

This commit is contained in:
Aidan Woods
2019-02-03 00:20:54 +00:00
parent 08c40afc16
commit d9792bb12c
2 changed files with 8 additions and 0 deletions

View File

@@ -29,6 +29,10 @@ final class Rule implements Block
$marker = \substr($Context->line()->text(), 0, 1);
if ($marker !== '*' && $marker !== '-' && $marker !== '_') {
return null;
}
if (
\substr_count($Context->line()->text(), $marker) >= 3
&& \chop($Context->line()->text(), " \t$marker") === ''