Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix RegExp used to remove existing line classes

  • Loading branch information...
commit c51b685c96b1cbf67aa97152160ba6d0a284b9af 1 parent 0672f62
@frangio authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  bigtext.js
View
2  bigtext.js
@@ -111,7 +111,7 @@
$t.find(childSelector).addClass(function(lineNumber, className)
{
// remove existing line classes.
- return [className.replace(new RegExp('\\s*' + BigText.LINE_CLASS_PREFIX + '\\d+'), ''),
+ return [className.replace(new RegExp('(?:^|\\s+)' + BigText.LINE_CLASS_PREFIX + '\\d+'), ''),
BigText.LINE_CLASS_PREFIX + lineNumber].join(' ');
});
Please sign in to comment.
Something went wrong with that request. Please try again.