I was using:
And it was working fine except it wouldn’t let me use non-standard
attributes on an img tag, which blows. I couldn’t find any way to
deactivate this strictness, so I decided to try Nokogiri instead:
Unfortunately this doesn’t work at all, b/c it turns out Nokogiri does
not seem to be using #instance_eval on the block. Without doing so I
don’t see how it can be at all useful. For example in my case I have
method called #body:
def body(&block) Nokogiri::HTML::Builder.new do body(&block) end end
By not using instance_eval Nokogiri doesn’t recognize ‘body’ as a tag,
but tries to call the method again, resulting in an infinite loop. So
I think this is a bug in Nokogiri’s builder.
In the mean time, can anyone offer a work around? Or is there a way to
turn off “strict-mode” for Markaby.