diff --git a/src/Components/Blocks/FencedCode.php b/src/Components/Blocks/FencedCode.php index 85b1117..dab873c 100644 --- a/src/Components/Blocks/FencedCode.php +++ b/src/Components/Blocks/FencedCode.php @@ -58,6 +58,10 @@ final class FencedCode implements ContinuableBlock ) { $marker = \substr($Context->line()->text(), 0, 1); + if ($marker !== '`' && $marker !== '~') { + return null; + } + $openerLength = \strspn($Context->line()->text(), $marker); if ($openerLength < 3) { diff --git a/src/Components/Blocks/Rule.php b/src/Components/Blocks/Rule.php index 1622ff0..893406d 100644 --- a/src/Components/Blocks/Rule.php +++ b/src/Components/Blocks/Rule.php @@ -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") === ''