}
}
- if (norm_spaces && g_ascii_isspace(*t)) {
- do {
+ if (norm_spaces) {
+ while (t > s && g_ascii_isspace(*(t - 1))) {
t --;
- } while (t > s && g_ascii_isspace(*t));
-
- if (!g_ascii_isspace(*t)) {
- t++; /* Preserve last space character */
}
}
{"abc def", "abc def"},
{"abc\ndef", "abc def"},
{"abc\n \tdef", "abc def"},
- {" abc def ", " abc def "},
+ {" abc def ", "abc def"},
{"FOO>BAR", "FOO>BAR"},
{"FOO>BAR", "FOO>BAR"},
{"FOO> BAR", "FOO>BAR"},
{"FOO>;;BAR", "FOO>;;BAR"},
- {"I'm ¬it; ", "I'm ¬it; "},
- {"I'm ∉ ", "I'm ∉ "},
+ {"I'm ¬it; ", "I'm ¬it;"},
+ {"I'm ∉ ", "I'm ∉"},
{"FOO& BAR", "FOO& BAR"},
{"FOO&&&>BAR", "FOO&&&>BAR"},
{"FOO)BAR", "FOO)BAR"},