1
0
Fork 0

Property keyword parser now simply checks for spaces (to be flexible enough to support any keywords in the future)

closure/master
Mike Gerwitz 2010-12-27 23:04:50 -05:00
parent 3277a30d54
commit 87e293e33f
1 changed files with 10 additions and 12 deletions

View File

@ -38,9 +38,8 @@ exports.parse = function ( prop )
prop = ''+( prop ); prop = ''+( prop );
if ( prop.length > 8 ) // only perform parsing if the string contains a space
{ if ( / /.test( prop ) )
if ( prop[ 8 ] === ' ' )
{ {
// the keywords are all words, except for the last, which is the // the keywords are all words, except for the last, which is the
// property name // property name
@ -53,7 +52,6 @@ exports.parse = function ( prop )
keyword_obj[ keywords[ i ] ] = true; keyword_obj[ keywords[ i ] ] = true;
} }
} }
}
return { return {
name: name, name: name,