Fixed whitespace parsing before word.
This commit is contained in:
parent
64ae964ae2
commit
005e7af6cd
10
src/word.cpp
10
src/word.cpp
@ -125,7 +125,7 @@ ref <word> word::parseNext
|
|||||||
|
|
||||||
if (!unencoded.empty())
|
if (!unencoded.empty())
|
||||||
{
|
{
|
||||||
if (prevIsEncoded)
|
if (prevIsEncoded && !isFirst)
|
||||||
unencoded = whiteSpaces + unencoded;
|
unencoded = whiteSpaces + unencoded;
|
||||||
|
|
||||||
ref <word> w = vmime::create <word>(unencoded, defaultCharset);
|
ref <word> w = vmime::create <word>(unencoded, defaultCharset);
|
||||||
@ -200,11 +200,13 @@ ref <word> word::parseNext
|
|||||||
++pos;
|
++pos;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (startPos != end && !isFirst && prevIsEncoded)
|
|
||||||
unencoded += whiteSpaces;
|
|
||||||
|
|
||||||
if (startPos != end)
|
if (startPos != end)
|
||||||
|
{
|
||||||
|
if (prevIsEncoded && !isFirst)
|
||||||
|
unencoded = whiteSpaces + unencoded;
|
||||||
|
|
||||||
unencoded += buffer.substr(startPos, end - startPos);
|
unencoded += buffer.substr(startPos, end - startPos);
|
||||||
|
}
|
||||||
|
|
||||||
// Treat unencoded text at the end of the buffer
|
// Treat unencoded text at the end of the buffer
|
||||||
if (!unencoded.empty())
|
if (!unencoded.empty())
|
||||||
|
Loading…
Reference in New Issue
Block a user