Skip to content

Commit e82d037

Browse files
authored
Merge pull request #14 from Lego-Fan9/v1.2.0-prep
Handle \n in LocBundleFormat
2 parents dd8fe8c + c5281c6 commit e82d037

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

swgoh-updates/loc-bundle-format/script.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,15 @@ function fixUnicode(input) {
3737
});
3838
}
3939

40-
function fixNewlines(input) {
40+
function fixDubleNewlines(input) {
4141
return input.replace(/\\\\n/g, "\n");
4242
}
4343

44-
const filters = [removeBold, removeItalics, removeCTag, removeColorCodes, fixUnicode, fixNewlines];
44+
function fixNewlines(input) {
45+
return input.replace(/\\n/g, "\n");
46+
}
47+
48+
const filters = [removeBold, removeItalics, removeCTag, removeColorCodes, fixUnicode, fixDubleNewlines, fixNewlines];
4549

4650
inputText.addEventListener("input", transformText);
4751

0 commit comments

Comments
 (0)