From 40fe13907e84ba3c241ef3fe3877d0858ada9a98 Mon Sep 17 00:00:00 2001 From: Gedion Date: Wed, 4 Jul 2012 20:42:36 -0500 Subject: [PATCH] small fix in linestylefilter.js --- src/static/js/linestylefilter.js | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/static/js/linestylefilter.js b/src/static/js/linestylefilter.js index 1cbfac29c..3915bf266 100644 --- a/src/static/js/linestylefilter.js +++ b/src/static/js/linestylefilter.js @@ -153,14 +153,20 @@ linestylefilter.getLineStyleFilter = function(lineLength, aline, textAndClassFun // prevent infinite loop if something funny's going on return nextAfterAuthorColors(txt, cls); } - var spanSize = txt.length; - if (spanSize > leftInAuthor) - { - spanSize = leftInAuthor; + var spanSize = txt.length; + if(txt&&txt.indexOf('data-tables')!=-1){ + spanSize = leftInAuthor = txt.length; } + else if (spanSize > leftInAuthor){ + spanSize = leftInAuthor; + } var curTxt = txt.substring(0, spanSize); - txt = txt.substring(spanSize); - nextAfterAuthorColors(curTxt, (cls && cls + " ") + extraClasses); + txt = txt.substring(spanSize); + if(curTxt&&curTxt.indexOf('data-tables')!=-1){ + nextAfterAuthorColors(curTxt,extraClasses ); + }else{ + nextAfterAuthorColors(curTxt, (cls && cls + " ") + extraClasses); + } curIndex += spanSize; leftInAuthor -= spanSize; if (leftInAuthor == 0)