Browse Source

Make comment/uncomment a little neater

Scott Lahteine 10 years ago
parent
commit
56769ba4f8
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      Marlin/configurator/js/configurator.js

+ 2
- 2
Marlin/configurator/js/configurator.js View File

307
       var $c = $config; // for now
307
       var $c = $config; // for now
308
       var txt = $c.text();
308
       var txt = $c.text();
309
 
309
 
310
-      var slash = val ? '' : '// ';
310
+      var slash = val ? '' : '//';
311
       var newline = inf.line
311
       var newline = inf.line
312
         .replace(/^([ \t]*)(\/\/)([ \t]*)/, '$1$3') // remove slashes
312
         .replace(/^([ \t]*)(\/\/)([ \t]*)/, '$1$3') // remove slashes
313
-        .replace('#define', slash + '#define');     // add them back
313
+        .replace(inf.pre+inf.define, inf.pre+slash+inf.define);     // add them back
314
 
314
 
315
       txt = txt.replace(inf.line, newline);
315
       txt = txt.replace(inf.line, newline);
316
       inf.line = newline;
316
       inf.line = newline;

Loading…
Cancel
Save