File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 92
92
// Exact match due to "quoted" value
93
93
search = search . substring ( 1 , search . length - 1 ) ;
94
94
return ( data == search ) ;
95
- } else if ( settings . exactMatch == "auto" && search . replace ( / \s + / g, "" ) . match ( / ^ [ < > ] / ) ) {
95
+ } else if ( settings . exactMatch == "auto" && search . replace ( / \s + / g, "" ) . match ( / ^ [ < > ] = ? / ) ) {
96
96
// Less < or greater > than
97
- var comp = search . replace ( / \s + / g, "" ) . substring ( 0 , 1 ) ;
98
- var val = search . replace ( / \s + / g, "" ) . substring ( 1 ) ;
99
- return ( ( comp == '>' && data * 1 > val * 1 ) || ( comp == '<' && data * 1 < val * 1 ) )
97
+ var comp = search . replace ( / \s + / g, "" ) . match ( / ^ [ < > ] = ? / ) [ 0 ] ;
98
+ var val = search . replace ( / \s + / g, "" ) . substring ( comp . length ) ;
99
+ return ( ( comp == '>' && data * 1 > val * 1 ) || ( comp == '<' && data * 1 < val * 1 ) || ( comp == '>=' && data * 1 >= val * 1 ) || ( comp == '<=' && data * 1 <= val * 1 ) )
100
100
} else if ( settings . exactMatch == "auto" && search . replace ( / \s + / g, "" ) . match ( / ^ .+ ( \. \. | - ) .+ $ / ) ) {
101
101
// Intervall 10..20 or 10-20
102
102
var arr = search . replace ( / \s + / g, "" ) . split ( / \. \. | - / ) ;
103
- return ( data * 1 > arr [ 0 ] * 1 && data * 1 < arr [ 1 ] * 1 ) ;
103
+ return ( data * 1 >= arr [ 0 ] * 1 && data * 1 <= arr [ 1 ] * 1 ) ;
104
104
}
105
105
return ( settings . exactMatch === true ) ? ( data == search ) : ( new RegExp ( search ) . test ( data ) ) ;
106
106
} ;
You can’t perform that action at this time.
0 commit comments