Hi, some time ago I asked a question about the Reformat Comment command from the Source bundle and Allan kindly made some suggestions. In the interim this command has continued to sort of not work the way I thought it should in a few cases, and the other day I actually sat down and spent an embarrassingly long time trying to fix it, and I was hoping someone could give me some feedback. There were two problems that I wanted to fix:<div>
<br></div><div>1.) The command doesn't respect the wrap column set by the user</div><div>2.) The command sometimes adds extra whitespace where it shouldn't, for example if you reformat</div><div>// lorem ...</div>
<div>// </div><div>// lorem...</div><div>it will add an extra space at the end of the empty line.</div><div><br></div><div>The first problem was pretty straightforward, and I think I corrected the second problem as well. It looks like the problem was in the rubywrap.rb script;<span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; "> a regular expression is used to identify comment lines, and this regexp would incorrectly match the newline at the end of the empty line. I changed it so that it only matches trailing spaces.</span></div>
<div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;"><br></span></font></div><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;">I've been using the modified rubywrap for a little while now and haven't noticed any problems introduced by this change. A diff patch is attached; if anyone has a few minutes to take a look I would appreciate it. Or if anyone thinks this is just a non-issue, I would appreciate hearing that too. Is this the right place to submit changes to be included in the Source repository? Thanks in advance!</span></font></div>
<div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;"><br></span></font></div><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;">-Daniel Grady<br>
</span></font></div><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;"><br></span></font></div>