k0kubun / hamlit

High Performance Haml Implementation
https://rubygems.org/gems/hamlit
Other
981 stars 59 forks source link

What happened to "ugly" option? #164

Closed kikonen closed 4 years ago

kikonen commented 4 years ago

Seeing now this with hamlit 2.13.0

 #<ActionView::Template::Error: undefined method `ugly=' for #<Hamlit::HamlOptions:0x00007fbc2ceb0178>

What happened to that option?

k0kubun commented 4 years ago

Sorry for the trouble. I guess it's about not 2.3.0 but 2.13.0, right?

I can understand it's related to the change at v2.13.0, but technically Hamlit (and Haml 5) has not supported ugly option. Do you specifically specify ugly in your Rails initializer, or does that happen with default configurations? I'd appreciate a repository which reproduces the issue if you can provide it.

kikonen commented 4 years ago

It was used explicitly to produce more compact html output with very large tables

k0kubun commented 4 years ago

I see. That had been a valid technique until Haml 4, but both Haml 5 and Hamlit produce the "more compact html output" without specifying ugly option. The option was accidentally accepted for internal implementation even while it doesn't configure anything. Please just remove the specification.

kikonen commented 4 years ago

Seemingly http://chriseppstein.github.io/blog/2010/02/08/haml-sucks-for-content/ is reason why it was used (see "Performance" chapter).