Don't translate text consisting of spaces only

This commit is contained in:
Blu3train 2021-11-28 11:23:18 +01:00 committed by Akash Mozumdar
parent 823987e79f
commit 306b9f0525

View File

@ -153,7 +153,7 @@ private:
bool ProcessSentence(std::wstring& sentence, SentenceInfo sentenceInfo)
{
if (sentenceInfo["text number"] == 0 || sentence.size() > maxSentenceSize) return false;
if (sentenceInfo["text number"] == 0 || sentence.size() > maxSentenceSize || !std::regex_replace(sentence, std::wregex(L"\\s|\u200B"), L"").length()) return false;
static class
{