代码优化

This commit is contained in:
mxd
2021-09-05 18:45:33 +08:00
parent 8232a5cf6e
commit 9b3e596bae

View File

@@ -311,7 +311,7 @@ Output.prototype.get_code = function(eol) {
var sweet_code = this.__lines.join('\n');
if (eol === '\r\n') {
sweet_code = sweet_code.replaceAll(/([^\r])\n/g, `$1${eol}`);
sweet_code = sweet_code.replace(/([^\r])\n/g, `$1${eol}`);
}else if (eol !== '\n') {
sweet_code = sweet_code.replace(/[\n]/g, eol);
}