1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-07 13:46:42 +02:00

feat(shortcodes): upd markdown shortcode

This commit is contained in:
Awilum
2022-05-09 17:01:43 +03:00
parent ea1c910218
commit 878835faea

View File

@@ -21,5 +21,9 @@ use function parsers;
// Shortcode: [markdown] markdown text here [/markdown]
parsers()->shortcodes()->addHandler('markdown', static function (ShortcodeInterface $s) {
if (! registry()->get('flextype.settings.parsers.shortcodes.shortcodes.markdown.enabled')) {
return '';
}
return parsers()->markdown()->parse($s->getContent());
});