mirror of
https://gitee.com/ssssssss-team/magic-api.git
synced 2026-06-09 18:32:16 +08:00
代码优化
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user