diff --git a/src/Components/Blocks/Rule.php b/src/Components/Blocks/Rule.php index a6a88e3..218b015 100644 --- a/src/Components/Blocks/Rule.php +++ b/src/Components/Blocks/Rule.php @@ -30,7 +30,10 @@ final class Rule implements Block $marker = $Context->line()->text()[0]; - if (\substr_count($Context->line()->text(), $marker) >= 3 and \chop($Context->line()->text(), " $marker") === '') { + if ( + \substr_count($Context->line()->text(), $marker) >= 3 + and \chop($Context->line()->text(), " \t$marker") === '' + ) { return new self; } diff --git a/tests/data/horizontal_rule.html b/tests/data/horizontal_rule.html index 4d3f44f..b8d1249 100644 --- a/tests/data/horizontal_rule.html +++ b/tests/data/horizontal_rule.html @@ -4,4 +4,5 @@

foo -***

\ No newline at end of file +***

+
\ No newline at end of file diff --git a/tests/data/horizontal_rule.md b/tests/data/horizontal_rule.md index 9a1bb57..f818593 100644 --- a/tests/data/horizontal_rule.md +++ b/tests/data/horizontal_rule.md @@ -9,4 +9,6 @@ ___ foo - *** \ No newline at end of file + *** + +* * * \ No newline at end of file