From 7f027e813c3bbb4d094d1e2c52fa02bd964b38ba Mon Sep 17 00:00:00 2001 From: Rob Garrison Date: Wed, 9 Dec 2015 13:37:52 -0600 Subject: [PATCH] Math: use core textExtraction on cells. See #1098 --- js/widgets/widget-math.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/js/widgets/widget-math.js b/js/widgets/widget-math.js index 2cb3b0f8e..8790781b8 100644 --- a/js/widgets/widget-math.js +++ b/js/widgets/widget-math.js @@ -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;