Closed olleolleolle closed 1 year ago
I also found this problem.
Here is a minimal reproduction code:
gem "sinatra", "3.0.6"
gem "slim", "5.1.1"
gem "temple", "0.10.1"
require "sinatra"
get "/" do
slim %(div class="" foo)
end
When we access http://localhost:4567/, we will see NoMethodError
.
The exception will be gone by one of the following change:
class
to other attribute, for example style
, lang
, id
class
to other (but nil
and false
are same as ""
)In version 0.10.1, argument **options
was added to the line https://github.com/judofyr/temple/blob/22072c8fbf3b437a7197d77064b80786a056be6e/lib/temple/generator.rb#L58
I found that if options[:save_buffer]
is false
, the exception will not raise.
Can you please confirm that https://github.com/judofyr/temple/commit/0bdacf93e87294e6dd2935c6178071329fa2bcda fixes the issue successfully for you?
https://github.com/judofyr/temple/commit/0bdacf93e87294e6dd2935c6178071329fa2bcda fixes it certainly. Thank you very much.
Thanks, I tagged version 0.10.2.
Oh, many thanks, you wonderful people 🙏!
Hello,
Apologies. This is a bug report with fuzzy edges.
I updated temple to 0.10.1 from 0.10.0 and I got a
in Sinatra:
Hmm. I pinned temple to 0.10.0, and went on with my day.
I registered a note in the Sinatra Discussions.