-
-
Notifications
You must be signed in to change notification settings - Fork 25
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
Support optionality in new {% types %}
tag
#322
Comments
Can you link the PR introducing the syntax in twig ? I'd like to know how they parse it. Currently All the work to do is my Tokenizer. |
Sure, it's done here: It's shown as closed but it's actually merged. |
I assume
is not valid too or is it valid @ruudk ? So I also have to avoid the |
No indeed. The The keys are unquoted. They can have a ? at the end. The values as always quoted. |
Current WIP #323 |
I'm opened to suggestion @ruudk Currently
is tokenized
In order to not add quote with the HashQuote rule, on way is to use different token type for this. I dunno. |
What if we split Is it possible for HashQuoteRule to ignore |
Or, we keep it as a single token and call it |
I can indeed, actually I just called
That's a good solution. |
I'll test it out now! |
Tested, it works! |
Release in 3.2.0 |
The new
types
tag supports optional variables like this:But this is currently detected as a problem:
And fixed like this:
which is not valid.
The text was updated successfully, but these errors were encountered: