On 12/28/06, <b class="gmail_sendername">Ed Howland</b> &lt;<a href="mailto:ed.howland@gmail.com">ed.howland@gmail.com</a>&gt; wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi all.<br><br>I just confirmed this issue with mv:attr<br><br>The directive help page says that you can use #{} to create an erb in<br>the attribute value. This works only somewhat.<br><br>E.g<br>&lt;div mv:attr=&quot;:id =&gt; #{kase_id}&quot; /&gt;
<br>...becomes...<br>&nbsp;&nbsp; &lt;div id=&quot;&lt;%= kase_id %&gt;&quot; /&gt;<br><br>&lt;div mv:attr=&quot;:id =&gt; #{kase_id 1}&quot; /&gt;<br>...becomes...<br>&nbsp;&nbsp; &lt;div id=&quot;&lt;%= kase_id 1 %&gt;&quot; /&gt;<br><br>But
<br>&lt;div mv:attr=&quot;:id =&gt; #{kase_id 1, 2}&quot; /&gt;<br>...becomes...<br>&nbsp;&nbsp; &lt;div /&gt;<br><br>And it matters not if you use parens on the helper<br>&lt;div mv:attr=&quot;:id =&gt; #{kase_id(1}&quot; /&gt;<br>
...becomes...<br>&nbsp;&nbsp; &lt;div id=&quot;&lt;%= kase_id(1) %&gt;&quot; /&gt;<br>But<br>&lt;div mv:attr=&quot;:id =&gt; #{kase_id(1,2)}&quot; /&gt;<br>...becomes...<br>&nbsp;&nbsp; &lt;div /&gt;<br><br>This happens after the first parameter to any helper function (2, 3,
<br>... n parameters.)<br><br>Ed</blockquote><div><br><br></div></div>I have found and fixed the issue. It had to do with simplistic logic in the parsing using regular expressions. I enhanced AttrStringParser and changed mv:attr to use that instead. AttrStringParser takes nesting and more things into consideration so it doesn&#39;t split prematurely on the comma. I added some test cases to verify.
<br><br>Also I added mv:select to the alphabetic list of directives on the bottom of the directives.html page which you mentioned was missing.<br><br>Since this was such a small fix and there are a few other things I would like to put in, I am going to hold off on pushing out a 
0.3.2 release but will email you the <a href="http://0.3.1.1">0.3.1.1</a> gems in a followup email. The code is checked into the trunk. <br><br>Thanks,<br><br>Jeff<br><br><br>