mirror of
https://github.com/Mottie/tablesorter.git
synced 2025-01-12 15:24:21 +00:00
Math: use core textExtraction on cells. See #1098
This commit is contained in:
parent
de4c3db1ad
commit
7f027e813c
@ -29,10 +29,7 @@
|
||||
'filterReset filterEnd ' ).split(' ').join('.tsmath '),
|
||||
|
||||
processText : function( c, $cell ) {
|
||||
var txt = $cell.attr( c.textAttribute );
|
||||
if ( typeof txt === 'undefined' ) {
|
||||
txt = $cell[0].textContent || $cell.text();
|
||||
}
|
||||
var txt = ts.getElementText( c, $cell, math.getCellIndex( $cell ) );
|
||||
txt = ts.formatFloat( txt.replace( /[^\w,. \-()]/g, '' ), c.table ) || 0;
|
||||
// isNaN('') => false
|
||||
return isNaN( txt ) ? 0 : txt;
|
||||
|
Loading…
Reference in New Issue
Block a user