mirror of
https://github.com/flextype/flextype.git
synced 2025-08-07 13:46:42 +02:00
feat(shortcodes): upd logic for tr
shortcode
This commit is contained in:
@@ -33,10 +33,10 @@ parsers()->shortcodes()->addHandler('tr', static function (ShortcodeInterface $s
|
||||
if ($s->getBbCode() != null) {
|
||||
|
||||
// Get vars
|
||||
foreach($s->getParameters() as $key => $value) {
|
||||
$vars = $value !== null ? strings($value)->contains($varsDelimeter) ? explode($varsDelimeter, $value) : [$value] : [];
|
||||
}
|
||||
|
||||
$value = $s->getBbCode();
|
||||
|
||||
$vars = $value !== null ? strings($value)->contains($varsDelimeter) ? explode($varsDelimeter, $value) : [$value] : [];
|
||||
|
||||
// Parse shortcodes for each var.
|
||||
$vars = array_map(fn($v) => parsers()->shortcodes()->parse(is_string($v) ? $v : ''), $vars);
|
||||
|
||||
|
Reference in New Issue
Block a user