Permalink
Browse files

fixed #512. Remove dodgy spaces that cause jshint barfage

  • Loading branch information...
1 parent 2f37628 commit e8bad25a0177f62a1f6b74f3471bee447221f666 @remy remy committed Apr 5, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 public/js/editors/panel.js
@@ -12,7 +12,7 @@ var editorModes = {
processing: 'text/x-csrc'
};
-var badChars = new RegExp('\u200B', 'g');
+var badChars = new RegExp('[\u200B\u0080-\u00a0]', 'g');
if (jsbin.settings.editor.tabMode === 'default') {
CodeMirror.keyMap.basic.Tab = undefined;
@@ -369,7 +369,7 @@ Panel.prototype = {
if (content === undefined) content = '';
this.controlButton.toggleClass('hasContent', !!content.trim().length);
this.codeSet = true;
- this.editor.setCode(content);
+ this.editor.setCode(content.replace(badChars, ''));
}
},
codeSet: false,

0 comments on commit e8bad25

Please sign in to comment.