mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-11-15 23:54:22 +00:00
Filter: clean up white-space in data-column
This commit is contained in:
parent
8d0ea85880
commit
df36ae331d
@ -1049,7 +1049,7 @@ ts.filter = {
|
||||
// look for multiple columns "1-3,4-6,8" in data-column
|
||||
var ranges, singles, indx,
|
||||
columns = [],
|
||||
val = ts.filter.getLatestSearch( $input ).attr('data-column');
|
||||
val = $.trim( ts.filter.getLatestSearch( $input ).attr('data-column') );
|
||||
// process column range
|
||||
if ( /-/.test( val ) ) {
|
||||
ranges = val.match( /(\d+)\s*-\s*(\d+)/g );
|
||||
@ -1069,7 +1069,7 @@ ts.filter = {
|
||||
}
|
||||
// process single columns
|
||||
if ( /,/.test( val ) ) {
|
||||
singles = val.split(',');
|
||||
singles = val.split( /\s*,\s*/ );
|
||||
$.each( singles, function(i,v) {
|
||||
if (v !== '') {
|
||||
indx = parseInt( v, 10 );
|
||||
|
Loading…
Reference in New Issue
Block a user