raml-org / raml-js-parser

(deprecated) A RAML parser based on PyYAML written in CoffeScript and available for use as NodeJs module or in-browser.
195 stars 53 forks source link

Bugs/regex on get property #93

Closed dmartinezg closed 10 years ago

dmartinezg commented 10 years ago

This is a fix for issue #92

xaka commented 10 years ago

I remember has_property played the trick with me as well long time ago. What if we separate string vs regexp matching into has_property and has_property_re OR check for instance type within has_property and if it's not regexp, do string matching instead? We need some kind of protection here and such changes shouldn't cost a lot.

dmartinezg commented 10 years ago

Instead of adding a new function I propose we change this one to do the "Right Thing", and from now on has_property does strict matching

dmartinezg commented 10 years ago

@xaka check the latest, it has strict string matches instead of regexes

xaka commented 10 years ago

There were few places where we were using regexp matching, but i can't find those now, so i'd say we're good and can live with the only function. :+1: