New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception is thrown when a {{switch}} value contains colon #2086

vladdu opened this Issue Jul 29, 2018 · 0 comments


None yet
2 participants

vladdu commented Jul 29, 2018

Describe the bug
If using for example {{ switch between='|md:flex-row-reverse'}}, the parser throws an exception.

RotateTags.index() checks if the between value contains a colon, and then proceeds to expand all options. If only one of them has the colon, then chaos ensues...

Suggested solution
In expand(), check if there was a colon and if not return the whole value
In RotateTags.php line 62, add

                $switch_vars[] = $value;
            } else if (is_numeric($repeat_count)) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment