From ed10b1982d110f9da6c1526b260ed54217879339 Mon Sep 17 00:00:00 2001 From: MaysWind Date: Tue, 9 Apr 2019 17:51:29 +0800 Subject: [PATCH] fix language file packaging bug when building bundled html --- gulpfile.js | 1 + 1 file changed, 1 insertion(+) diff --git a/gulpfile.js b/gulpfile.js index 4a7f98d..8493774 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -135,6 +135,7 @@ gulp.task('process-assets-bundle', ['prepare-fonts', 'prepare-langs', 'prepare-h var lastPointIndex = fileName.lastIndexOf('.'); var languageName = fileName.substr(0, lastPointIndex); + content = content.replace(/\r/g, ''); content = content.replace(/\n/g, '\\n'); content = content.replace(/"/g, '\\"'); result += 'e.setLanguageAsset(\'' + languageName + '\',"' + content + '");';