Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

trim whitespace

  • Loading branch information...
commit 981743cdb9f969f86176ebee5a5d6cabbc682d64 1 parent 234ee48
@tybenz tybenz authored
Showing with 5 additions and 2 deletions.
  1. +5 −2 js/app.js
View
7 js/app.js
@@ -1086,13 +1086,13 @@ TR.initStyleArray = function( refresh ) {
type: "string"
};
TR.tokens[i++] = {
- value: style.substr( index, length ),
+ value: style.substr( index, length ).trim(),
type: "placeholder",
ref: reference
};
//update TR.styleArray
if( refresh != "refresh" ) {
- TR.styleArray[reference] = TR.tokens[i-1].value.replace( /\/\*.*\*\//, "" );
+ TR.styleArray[reference] = TR.tokens[i-1].value.replace( /\/\*.*\*\//, "" ).trim();
}
//cut off string and continue
style = style.substring( index+length );
@@ -1665,4 +1665,7 @@ TR.updateThemeRoller = function( tab ) {
});
}
+String.prototype.trim = function() {
+ return this.replace(/^\s+|\s+$/g,"");
+}
}) ( jQuery, window );
Please sign in to comment.
Something went wrong with that request. Please try again.