small fix in linestylefilter.js

This commit is contained in:
Gedion 2012-07-04 20:42:36 -05:00
parent d6dbb9c9ef
commit 40fe13907e

View file

@ -154,13 +154,19 @@ linestylefilter.getLineStyleFilter = function(lineLength, aline, textAndClassFun
return nextAfterAuthorColors(txt, cls);
}
var spanSize = txt.length;
if (spanSize > leftInAuthor)
{
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);
if(curTxt&&curTxt.indexOf('data-tables')!=-1){
nextAfterAuthorColors(curTxt,extraClasses );
}else{
nextAfterAuthorColors(curTxt, (cls && cls + " ") + extraClasses);
}
curIndex += spanSize;
leftInAuthor -= spanSize;
if (leftInAuthor == 0)