Always ignore newlines between words.
This commit is contained in:
parent
b1b3f30e8d
commit
c53e914ea5
@ -82,11 +82,14 @@ shared_ptr <word> word::parseNext
|
|||||||
// - before the first word
|
// - before the first word
|
||||||
// - between two encoded words
|
// - between two encoded words
|
||||||
// - after the last word
|
// - after the last word
|
||||||
|
// Always ignore newlines
|
||||||
string whiteSpaces;
|
string whiteSpaces;
|
||||||
|
|
||||||
while (pos < end && parserHelpers::isSpace(buffer[pos]))
|
while (pos < end && parserHelpers::isSpace(buffer[pos]))
|
||||||
{
|
{
|
||||||
whiteSpaces += buffer[pos];
|
if (buffer[pos] != '\r' && buffer[pos] != '\n') // do not include newlines
|
||||||
|
whiteSpaces += buffer[pos];
|
||||||
|
|
||||||
++pos;
|
++pos;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -269,6 +269,10 @@ VMIME_TEST_SUITE_BEGIN(textTest)
|
|||||||
// Whitespaces and multiline
|
// Whitespaces and multiline
|
||||||
VASSERT_EQ("16", "a b c d e", DISPLAY_FORM("=?ISO-8859-1?Q?a_b_?=c\n\t=?ISO-8859-1?Q?d_?=e"));
|
VASSERT_EQ("16", "a b c d e", DISPLAY_FORM("=?ISO-8859-1?Q?a_b_?=c\n\t=?ISO-8859-1?Q?d_?=e"));
|
||||||
|
|
||||||
|
// Ignored newlines
|
||||||
|
VASSERT_EQ("17", "ab", DISPLAY_FORM("=?ISO-8859-1?Q?a?=\r\nb"));
|
||||||
|
VASSERT_EQ("18", "a b", DISPLAY_FORM("=?ISO-8859-1?Q?a?= \r\nb"));
|
||||||
|
|
||||||
#undef DISPLAY_FORM
|
#undef DISPLAY_FORM
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user