mirror of
https://github.com/erusev/parsedown.git
synced 2023-08-10 21:13:06 +03:00
Thematic breaks can't have an indent of more than 3
This commit is contained in:
@@ -24,6 +24,10 @@ final class Rule implements Block
|
|||||||
Block $Block = null,
|
Block $Block = null,
|
||||||
State $State = null
|
State $State = null
|
||||||
) {
|
) {
|
||||||
|
if ($Context->line()->indent() > 3) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
$marker = $Context->line()->text()[0];
|
$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(), " $marker") === '') {
|
||||||
|
|||||||
@@ -3,3 +3,5 @@
|
|||||||
<hr />
|
<hr />
|
||||||
<hr />
|
<hr />
|
||||||
<hr />
|
<hr />
|
||||||
|
<p>foo
|
||||||
|
***</p>
|
||||||
@@ -7,3 +7,6 @@
|
|||||||
***
|
***
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
|
foo
|
||||||
|
***
|
||||||
Reference in New Issue
Block a user