I was familiarizing myself with the Haml engine code and came across
this untested negative case.  I had assumed that this would throw
"Illegal element: classes and ids must have values."

The problem is with the

if !attributes.empty? && '.#'.include?(attributes)

check on line 729 of haml/engine.rb.

This only checks for attributes of length 1 (which should be invalid
in every case, right, not just the above, since attributes include the
'.' or '#' qualifier).

This fixes the problem:

if !attributes.empty? && (attributes.length == 1 || attributes =~ /[.#]
[.#\{]/)

Then add "%p..class" to the list of syntax errors in engine_test.rb.

Assuming I'm not missing something; which I probably am.  What is the
best way to contribute changes ?

On an aside, I'm getting about 33% variance between different runs of
the benchmark utility.  Any idea what is going on there ?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Haml" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/haml?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to