Way to Use Parenthesis inside Kirbytag?

I don’t know much about the code/what you guys need (it’s nothing I need right now) but when I see this

                                        //  v  WTF?

in the code, you know it’s a serious matter lol.

2 Likes

:smile: Small explanation here:
I normally use tools like regex101 to test my regex before they go into production.
Somehow /\\\)/ does not catch \), even tho it should ("\" and “)” have to be escaped).
By adding another pair of back slashes it worked, thus resulting in this monstrously /\\\\\)/. Not sure what shenanigans are at work here.

1 Like

This worked for me, it’s just missing an opening [ at the start:

Kirby::plugin('my/brackets', [
    'hooks' => [ ...
1 Like

hmm, this just renders the temporary replacement for me (k 3.3.4):

You can now use parentheses inside Kirbytags (at least if you don’t run into edge cases when using regex stuff inside your tags), Kirby 3.4.x, not Kirby 2, of course.