More on issue #515.
I’ve deliberately left the indentation alone on the erb template, so that it’s easier to see what’s changed.
It’s a fairly “brute force” fix, in that there may be a simpler way to combine the various conditionals to generate the correct code, but it’s a maze of twisty little passages, all alike.
Silence unused variable warning.
Haml does some magic with eval and binding, so _erbout isn't really
unused. In order to silence the warning it needs to be used in way that
can be seen, so use to_s as a no-op.
Silence warnings in generated code.
I admire your courage, that code is quite difficult to understand. :) Will take a look at this soon - thanks a lot for the time you've been putting into Haml.
I noticed this conflicted with some other work you did, I assume you were able to resolve it okay?
Yup, no problem at all.