From 07d7c1c749bddabb74c5a1cae2a274382c98f1b0 Mon Sep 17 00:00:00 2001 From: Mottie Date: Mon, 18 Mar 2013 19:50:30 -0500 Subject: [PATCH] getData will now allow dashed class names; e.g. "sorter-my-custom-parser" --- js/jquery.tablesorter.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/jquery.tablesorter.js b/js/jquery.tablesorter.js index 21f974c4..70ccbbd3 100644 --- a/js/jquery.tablesorter.js +++ b/js/jquery.tablesorter.js @@ -1163,8 +1163,8 @@ } else if (ch && typeof ch[key] !== 'undefined') { val += ch[key]; } else if (cl !== ' ' && cl.match(' ' + key + '-')) { - // include sorter class name "sorter-text", etc - val = cl.match( new RegExp(' ' + key + '-(\\w+)') )[1] || ''; + // include sorter class name "sorter-text", etc; now works with "sorter-my-custom-parser" + val = cl.match( new RegExp('\\s' + key + '-([\\w-]+)') )[1] || ''; } return $.trim(val); };