Property keyword parser now simply checks for spaces (to be flexible enough to support any keywords in the future)
parent
3277a30d54
commit
87e293e33f
|
@ -38,20 +38,18 @@ 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
|
||||||
{
|
// property name
|
||||||
// the keywords are all words, except for the last, which is the
|
keywords = prop.split( ' ' );
|
||||||
// property name
|
name = keywords.pop();
|
||||||
keywords = prop.split( ' ' );
|
|
||||||
name = keywords.pop();
|
|
||||||
|
|
||||||
var i = keywords.length;
|
var i = keywords.length;
|
||||||
while ( i-- )
|
while ( i-- )
|
||||||
{
|
{
|
||||||
keyword_obj[ keywords[ i ] ] = true;
|
keyword_obj[ keywords[ i ] ] = true;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue