Patched. Thanks!

- Nathan

Spongy wrote:
> I've uploaded a patch[1] which just changes the placement of the
> repetition operator. I've run the tests over the change on both Ruby
> +Oniguruma and Ruby 1.8.5 which I built from MacPorts and they all
> pass.
>
> [1]: http://groups.google.com/group/haml/web/sass_engine_attribute_regex.patch
>
> On May 5, 11:08 am, Spongy <[EMAIL PROTECTED]> wrote:
>   
>> Thanks, thats way better than what I was going to suggest.
>>
>> It seems the only part of the regex which oniguruma doesn't like is
>> the repetition of the $ end of line meta character. I'll see if I can
>> find a Oni alternative regex to accomplish the same thing.
>>
>> On May 5, 8:23 am, merg <[EMAIL PROTECTED]> wrote:
>>
>>     
>>> In 'The Ruby Way' from Hal Fulton you find the following:
>>>       
>>> def oniguruma?
>>>   return true if RUBY_VERSION >= "1.9.0"
>>>   if defined?(Regexp::ENGINE) # Is ENGINE defined?
>>>     if Regexp::ENGINE.include?('Oniguruma')
>>>       return true # Some version of Oniguruma
>>>     else
>>>       return false # Pre-Oniguruma engine
>>>     end
>>>   end
>>>   eval("/(?<!a)b/") # Newer syntax
>>>   return true # It worked: New engine.
>>>   rescue SyntaxError # It failed: We're using the
>>>     return false # old engine.
>>> end
>>>       
>>> On 5/5/07, Spongy <[EMAIL PROTECTED]> wrote:
>>>       
>>>> I'll take a look and see if there is a way to detect the regex engine.
>>>> Just looking at the regex though I'm not really sure which part it is
>>>> breaking on.
>>>>         
>>>> On May 4, 7:32 pm, "Nathan Weizenbaum" <[EMAIL PROTECTED]> wrote:
>>>>         
>>>>> Haml probably breaks in several different ways with 1.9. We'll eventually 
>>>>> go
>>>>> through and rewrite the regexen for Oniguruma (which will in turn fix a 
>>>>> few
>>>>> parsing bugs), but for now, I'm just going to declare it incompatible.
>>>>>           
>>>>> Is there a way to detect which Regex engine is available? If so, we'd 
>>>>> gladly
>>>>> take a patch to run an engine detect and use compatible regexen.
>>>>>           
>>>>> - Nathan
>>>>>           
>>>>> On 5/4/07, Spongy <[EMAIL PROTECTED]> wrote:
>>>>>           
>>>>>> This seems to break if you have compiled Ruby with the Oniguruma
>>>>>> regular expression engine which I believe is also the regex engine in
>>>>>> Ruby 1.9.
>>>>>>             
>>>>>> I get the following error
>>>>>> SyntaxError: <path>/vendor/plugins/haml/lib/sass/engine.rb:43: target
>>>>>> of repeat operator is invalid: /:([^\s=:]+)\s*(=?)(?:\s|$)+(.*)/
>>>>>>             
>>>>>> On May 3, 10:08 am, Nathan Weizenbaum <[EMAIL PROTECTED]> wrote:
>>>>>>             
>>>>>>> Hello, folks,
>>>>>>>               
>>>>>>> I just made the 500th Subversion commit! Whoo, large figures significant
>>>>>>> only in base 10! Anyhoo, both commits 499 and 500 have some cool new
>>>>>>> features. The first is a new attribute syntax for Sass, implemented by
>>>>>>> Jonah Fox (aka weepy):
>>>>>>>               
>>>>>>>   #main
>>>>>>>     color: #f00
>>>>>>>     background:
>>>>>>>       image: url(/images/hideous_animation.gif)
>>>>>>>       repeat: repeat-x
>>>>>>>               
>>>>>>> This will be available alongside the old familiar ":foo bar" syntax.
>>>>>>>               
>>>>>>> The second feature is by Robin Ward, and it's the ability to nest Sass
>>>>>>> files in the public/stylesheets/sass folder. So, for instance,
>>>>>>> public/stylesheets/sass/how_awesome/super_awesome.sass will create
>>>>>>> public/stylesheets/how_awesome/super_awesome.css. This promises to be
>>>>>>> very useful for larger projects
>>>>>>>               
>>>>>>> Enjoy! And be sure to thank our wonderful contributors!
>>>>>>> - Nathan
>>>>>>>               
>>> --
>>> --Merg
>>>       
>
>
> >
>
>   


--~--~---------~--~----~------------~-------~--~----~
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