Skip to content

Commit 6d8ef91

Browse files
authored
fix(custom-text): Don't trim custom text (@Leonabcd123) (monkeytypegame#7170)
### Description Removed the `.trim()` call that deleted leading and trailing literal tabs or newlines from custom text. This is to make sure that no matter what the custom text is, it will always stay the same after updating it. The current problem is that leading and trailing tabs and newlines will be removed when you click on "change" and "ok" for the second time (because they're now in their literal form, not \t and \n).
1 parent 5d3bcb7 commit 6d8ef91

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ function cleanUpText(): string[] {
269269

270270
if (text === "") return [];
271271

272-
text = text.normalize().trim();
272+
text = text.normalize();
273273
// text = text.replace(/[\r]/gm, " ");
274274

275275
//replace any characters that look like a space with an actual space

0 commit comments

Comments
 (0)