Bug parsing AttributeNode class (MVC)

Topics: blog
Sep 9, 2010 at 2:17 PM

The following haml line produces parsing errors:

%a{href => "http://reference.htm",:class =>"active"} To Reference
I found the bug in the "ParseAttributes"- function at AttributeNode-Class function

Here is the code that worked well when I amended it

                // start of value
                if (step == 3)
                {
                    if (!char.IsWhiteSpace(ch))
                    {
                        start = i+1;  //<-- changed
                        ++step;
                    }
                }

Hope this helps.

Greetings