mirror of
https://github.com/flextype/flextype.git
synced 2025-08-07 21:56:33 +02:00
feat(shortcodes): add ability to parse nested shortcodes for markdown
s…
This commit is contained in:
@@ -19,11 +19,12 @@ namespace Flextype\Parsers\Shortcodes;
|
||||
use Thunder\Shortcode\Shortcode\ShortcodeInterface;
|
||||
use function parsers;
|
||||
|
||||
// Shortcode: [markdown] markdown text here [/markdown]
|
||||
// Shortcode: (markdown)
|
||||
// Usage: (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());
|
||||
return parsers()->markdown()->parse(parsers()->shortcodes()->parse($s->getContent()));
|
||||
});
|
Reference in New Issue
Block a user