-
Notifications
You must be signed in to change notification settings - Fork 35
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
Bug: Interpolation #21
Comments
Very nice find! Fix is in The fact that |
@twbartel thanks for your quick fixes! I probably won’t get around to testing until tomorrow. I was initially confused by question. You’re saying in the context of If that’s the case, yep, totally agree with you. No need to change that behavior, I’d think. |
Yes, you understood correctly. When the string containing an interpolation consists of just one interpolation expression, it will be replaced by just the interpolated variable. |
Sounds good. This one also good! Thanks! |
{% include "#{bar}" %}
with singleQuotes set to
true
will output:{% include 'bar' %}
☝️ Couple of things here:
Even if singleQuotes is set to true, ideally since double quotes are required for
"string#{interpolation}"
to work, the singleQuote setting should only convert double quotes to single quotes if#{ }
is not present.https://twig.symfony.com/doc/3.x/templates.html#string-interpolation
The other other obvious weird thing going on is twig-melody is removing
#{ ... }
altogether.The text was updated successfully, but these errors were encountered: