fix: issue where '\n\n' was not rendering correctly in custom text (SpaceWaffles5827) (#5370)

* fix: issue where '\n\n' was not rendering correctly in custom text

* fix: prettier styling
This commit is contained in:
Jack Hartwig 2024-05-07 03:13:14 -05:00 committed by GitHub
parent e9a83d5a62
commit 9c652d29e8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -268,6 +268,7 @@ function cleanUpText(): string[] {
if (state.replaceControlCharactersEnabled) {
text = text.replace(/([^\\]|^)\\t/gm, "$1\t");
text = text.replace(/\\n/g, " \n");
text = text.replace(/([^\\]|^)\\n/gm, "$1\n");
text = text.replace(/\\\\t/gm, "\\t");
text = text.replace(/\\\\n/gm, "\\n");