Closed 0xdevalias closed 4 years ago
Thanks to report.
I expected one of the old or new methods to work, but playing around it seems neither do
TBH I didn't know this feature of Haml. You know Haml better than me :)
Supporting this feature would slightly degrade :ruby
filter's performance when haml_io
is not used (or complicate the filter's implementation for optimization). So I'd like to be careful for introducing the support.
For the time being, I created https://github.com/hamlit/hamlit-haml_io for you. This may be default once it becomes popular.
There also didn't seem to be anything useful in the documentation to point this out: https://www.rubydoc.info/gems/hamlit/2.7.2/Hamlit/Filters/Ruby
Sorry about that, but I'm not maintaining the documentation. https://github.com/k0kubun/hamlit/blob/master/REFERENCE.md is the only document I officially maintain for Hamlit.
Since I believe Hamlit::Filters::Ruby
is an internal implementation detail, I'd like to avoid using it for documenting :ruby
filter. So I added https://github.com/k0kubun/hamlit/commit/ec6f6f4aa7bbacb09beb1f52f4d69c00722880f1.
That's fair enough. Thanks for the super quick turnaround on a workaround and reference update!
I expected one of the old or new methods to work, but playing around it seems neither do:
Playing around further it seems that we're meant to return the value we want from it, which in hindsight makes sense, but is different to all other documented API's for haml equivalents:
There also didn't seem to be anything useful in the documentation to point this out: