return;
target->chars_left--;
if (ctx->add_whitespace) {
+ if (target->chars_left == 0) {
+ /* don't add a trailing whitespace */
+ return;
+ }
str_append_c(target->snippet, ' ');
ctx->add_whitespace = FALSE;
- if (target->chars_left == 0)
- return;
target->chars_left--;
}
*count_r = uni_utf8_char_bytes(data[0]);
">quoted long text",
7,
">quoted" },
+ { "Content-Type: text/plain\n"
+ "\n"
+ ">quoted long text",
+ 8,
+ ">quoted" },
+ { "Content-Type: text/plain\n"
+ "\n"
+ "whitespace and more",
+ 10,
+ "whitespace" },
+ { "Content-Type: text/plain\n"
+ "\n"
+ "whitespace and more",
+ 11,
+ "whitespace" },
{ "Content-Type: text/plain; charset=utf-8\n"
"\n"
"Invalid utf8 \x80\xff\n",