Permalink
Browse files

Merge pull request #4 from tjeezy/master

Better contiguous spaces handling in class lists
  • Loading branch information...
kylebarrow committed Jul 30, 2012
2 parents 02474e8 + fdb567b commit 3a9649b00079de63320b827f5ce6de998d4f1fa1
Showing with 2 additions and 1 deletion.
  1. +2 −1 chibi.js
View
@@ -356,7 +356,7 @@ You should have received a copy of the GNU General Public License along with thi
if (classes) {
// Trim any whitespace
- classarray = classes.split(' ');
+ classarray = classes.split(/\s+/);
action = action || 'replace';
}
@@ -402,6 +402,7 @@ You should have received a copy of the GNU General Public License along with thi
break;
}
+ elm.className = elm.className.replace(/^\s+|\s+$/g, '');
}
else
{

0 comments on commit 3a9649b

Please sign in to comment.