File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,9 @@ module.exports = {
99 setValue : function ( value ) {
1010 this . _value = false ;
1111 if ( value === true ) this . _value = 'after' ;
12- if ( typeof value === 'string' && value . match ( / a f t e r | b e f o r e | b o t h | (? = .* (?: \s | : ) ) \s * : ? \s * / ) ) this . _value = value ;
12+ if ( typeof value === 'string' && value . match ( / a f t e r | b e f o r e | b o t h | (? = .* (?: [ \t \n ] | : ) ) [ \t \n ] * : ? [ \t \n ] * / ) ) {
13+ this . _value = value ;
14+ }
1315 if ( ! this . _value ) return ;
1416 return this ;
1517 } ,
@@ -20,7 +22,7 @@ module.exports = {
2022 * @param {node } node
2123 */
2224 process : function ( nodeType , node ) {
23- var detectSpaces = this . _value . match ( / ( ( \s * ) : ) ? ( \s * ) / ) ;
25+ var detectSpaces = this . _value . match ( / ( ( [ \t \n ] * ) : ) ? ( [ \t \n ] * ) / ) ;
2426 if ( nodeType === 'property' ) {
2527 if ( node [ node . length - 1 ] [ 0 ] === 's' ) node . pop ( ) ;
2628 if ( this . _value === 'both' || this . _value === 'before' )
You can’t perform that action at this time.
0 commit comments