-
Notifications
You must be signed in to change notification settings - Fork 113
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
Using == in a th:with tag on the body element when a layout also has a th:with tag doesn't work #244
Comments
Ah, this might be due to the very naive string processing to extract variables, which is likely related to #222 raised a while ago. I'm struggling to remember why I may have done my own string processing here instead of finding something in Thymeleaf that can do it - I should be able to hand it off to Thymleaf to resolve this bug 🤔 |
Sorry I did not see #222. As to handing it off to Thymeleaf, perhaps it's related to how Thymeleaf handles it differently base on if Thymeleaf is used with Spring or not. I think it's OGNL vs SpringEL? Or maybe it was thought it was overkill since it's just about merging them without actually processing them? For my use I was able to just not use a th:with tag in my layout file to avoid the issue, since it only occurs when merging. |
Thanks again for the bug report. Provided I got the test case right then this should be fixed in the next release, 3.4.0, which I hope to release soon. |
No problem, and thank you for fixing it so quickly! |
First off thank you for writing this library, it's helpful.
thymeleaf-layout-dialect version 3.3.0 in an application using Spring.
Example "isA = ${ a == b ? true : false}" results in the VariableDeclaration's name being "isA" and the value being "${ a ", which is incorrect.
If the above expression is modified to us 'eq" vs '==' it works fine. The issue also holds true with "!=".
Seems like all equal signs are split not just the first one. (From the VariableDeclaration object):
(name, value) = assignation.stringRepresentation.split('=')
The text was updated successfully, but these errors were encountered: