1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-27 22:08:02 +00:00

Make comment/uncomment a little neater

This commit is contained in:
Scott Lahteine 2015-02-05 19:39:42 -08:00
parent 94bebf31ac
commit 56769ba4f8

View File

@ -307,10 +307,10 @@ var configuratorApp = (function(){
var $c = $config; // for now
var txt = $c.text();
var slash = val ? '' : '// ';
var slash = val ? '' : '//';
var newline = inf.line
.replace(/^([ \t]*)(\/\/)([ \t]*)/, '$1$3') // remove slashes
.replace('#define', slash + '#define'); // add them back
.replace(inf.pre+inf.define, inf.pre+slash+inf.define); // add them back
txt = txt.replace(inf.line, newline);
inf.line = newline;