You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Custom classes tag breaks/errors when code contains function with a parameter (php) #166
When there is a function with a parameter in the code surrounded by custom classes tag, I either get an error, or the argument gets cut weirdly.
For example, if I have this: {:_:function ($test) {:}, it will return this:
The custom class tokens were created before the PHP function parameters injection rewrote the content, so their offsets pointed to the wrong place. That's where ($te$test) came from, and the error when the function was closed with {}.
Injections now report what they replaced, and earlier tokens are moved accordingly. Both examples from this issue now render as expected:
Activity
Akiyo974 commentedon Oct 20, 2026
I opened #238 , which fixes this as well.
The custom class tokens were created before the PHP function parameters injection rewrote the content, so their offsets pointed to the wrong place. That's where
($te$test)came from, and the error when the function was closed with{}.Injections now report what they replaced, and earlier tokens are moved accordingly. Both examples from this issue now render as expected:
{:_:function ($test) {:}→<span class="_"><span class="hl-keyword">function</span> (<span class="hl-injection">$test</span>) {</span>