You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove a rule like the DivRule::class and the parsed HTML still includes HTML produced by the rule
useTempest\Markdown\Markdown;
useTempest\Markdown\Rules\DivRule;
$markdown = newMarkdown()->removeRules(DivRule::class);
echo$markdown->parse(":::alert\nThis is an important message!\n:::")->html;
Output (should not have <div class="alert"></div>)
<p><divclass="alert">This is an important message!
</div></p>
Possible cause
Many tokens rebuild their own rule set inside forToken(), which overrides the parser's configured ruleset.
Yeah this is an issue. I actually need to look at extensibility as a whole, now that I've used the package in multiple projects. I'll look into this. If you have ideas, feel free to share them though!
Activity
brendt commentedon Aug 5, 2026
Yeah this is an issue. I actually need to look at extensibility as a whole, now that I've used the package in multiple projects. I'll look into this. If you have ideas, feel free to share them though!