Skip to content

Commit ce2ec3e

Browse files
committed
Fixed multiple tab characters not being parsed correctly
1 parent c2cee8b commit ce2ec3e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

frontend/src/ts/modals/custom-text.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,15 +279,15 @@ function cleanUpText(): string[] {
279279
}
280280

281281
if (state.replaceControlCharactersEnabled) {
282-
text = text.replace(/([^\\]|^)\\t/gm, "$1\t");
282+
text = text.replace(/\\t/g, "\t");
283283
text = text.replace(/\\n/g, " \n");
284284
text = text.replace(/([^\\]|^)\\n/gm, "$1\n");
285285
text = text.replace(/\\\\t/gm, "\\t");
286286
text = text.replace(/\\\\n/gm, "\\n");
287287
}
288288

289289
text = text.replace(/ +/gm, " ");
290-
text = text.replace(/( *(\r\n|\r|\n) *)/g, "\n ");
290+
text = text.replace(/( *(\r\n|\r|\n) *)/g, "\n");
291291
if (state.removeFancyTypographyEnabled) {
292292
text = Strings.cleanTypographySymbols(text);
293293
}

0 commit comments

Comments
 (0)