-
-
Notifications
You must be signed in to change notification settings - Fork 925
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
Haml on JRuby 9.2.0.0 throws error evaluating interpolated element attribute with #
#5210
Comments
Actually, I was able to make a much smaller test case. Too bad I didn't think of this before making the whole Rails app. -# test.haml
- time = Time.now
%p{ 'data-time': "##{time}" } Time
Adding a space between -# test.haml
- time = Time.now
%p{ 'data-time': "# #{time}" } Time
|
#
Neato...so it's having a problem with the double # here. Maybe a simple fix @enebo? |
Maybe not simple at all... :) It took a while to trace this to Temple using Ripper. I did just reduce it to a ripper bug though. Here is a minimized test case:
We should be seeing to_tstring_content of just '#', but instead we slurp in '##{time}'. Getting close. |
Nice work! |
Interesting issue with JRuby 9.2.0.0 and Haml when attempting to evaluate an element attribute with a
#
just before the interpolated variable.This is the line which causes the error.
Using
%p{ data: { target: ('#' + partial_local_var.to_s) } }
does not throw the error.I made a test app to demonstrate the error.
The text was updated successfully, but these errors were encountered: