1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-08 06:06:45 +02:00

feat(shortcodes): update textile shortcode

This commit is contained in:
Awilum
2022-05-25 21:07:03 +03:00
parent 64f8b5dab1
commit d4aef785e7

View File

@@ -19,11 +19,12 @@ namespace Flextype\Parsers\Shortcodes;
use Thunder\Shortcode\Shortcode\ShortcodeInterface;
use function parsers;
// Shortcode: [textile] textile text here [/textile]
// Shortcode: textile
// Usage: (textile) textile text here (/textile)
parsers()->shortcodes()->addHandler('textile', static function (ShortcodeInterface $s) {
if (! registry()->get('flextype.settings.parsers.shortcodes.shortcodes.textile.enabled')) {
return '';
}
return parsers()->textile()->parse($s->getContent());
return parsers()->textile()->parse(parsers()->shortcodes()->parse($s->getContent()));
});