fix newlines

This commit is contained in:
Akash Mozumdar 2019-01-23 13:49:41 -05:00
parent ac6294f30e
commit ba83760157
2 changed files with 2 additions and 2 deletions

View File

@ -154,7 +154,7 @@ bool ProcessSentence(std::wstring& sentence, SentenceInfo sentenceInfo)
if (translation[i] == L'\\')
{
translation[i] = 0x200b;
if (translation[i + 1] == L'r') translation[i + 1] = L'\r';
if (translation[i + 1] == L'r') translation[i + 1] = 0x200b; // for some reason \r gets displayed as a newline
if (translation[i + 1] == L'n') translation[i + 1] = L'\n';
if (translation[i + 1] == L't') translation[i + 1] = L'\t';
}

View File

@ -200,7 +200,7 @@ bool ProcessSentence(std::wstring& sentence, SentenceInfo sentenceInfo)
if (translation[i] == L'\\')
{
translation[i] = 0x200b;
if (translation[i + 1] == L'r') translation[i + 1] = L'\r';
if (translation[i + 1] == L'r') translation[i + 1] = 0x200b; // for some reason \r gets displayed as a newline
if (translation[i + 1] == L'n') translation[i + 1] = L'\n';
if (translation[i + 1] == L't') translation[i + 1] = L'\t';
}