Merge pull request #21 from LingMuQingYu/feature-autochange-unicode

upd: server.properties中文自动转换unicode编码
This commit is contained in:
Suwings 2022-03-29 22:14:36 +08:00 committed by GitHub
commit 741f83ded9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -67,6 +67,9 @@ export class ProcessConfig {
if (this.iProcessConfig.type === "properties") {
text = properties.stringify(object);
text = text.replace(/ = /gim, "=");
if (this.iProcessConfig.fileName == "server.properties") {
text = text.replace(/\\\\u/gim, "\\u");
}
}
if (this.iProcessConfig.type === "json") {
text = JSON.stringify(object);