diff --git a/extensions/bingtranslate.cpp b/extensions/bingtranslate.cpp index f21f73c..f935613 100644 --- a/extensions/bingtranslate.cpp +++ b/extensions/bingtranslate.cpp @@ -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'; } diff --git a/extensions/googletranslate.cpp b/extensions/googletranslate.cpp index 851c541..31ee689 100644 --- a/extensions/googletranslate.cpp +++ b/extensions/googletranslate.cpp @@ -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'; }