more attempts at improving word wrap
This commit is contained in:
parent
5a7cfb7c65
commit
178605ea01
@ -716,11 +716,17 @@ static char *www_wordwrap(char *content, int cutoff) {
|
||||
last_space = &ret[at];
|
||||
}
|
||||
at++;
|
||||
} else {
|
||||
ret[at++] = content[i];
|
||||
}
|
||||
ret[at] = '\0';
|
||||
if (content[i] == '\r') {
|
||||
} else {
|
||||
ret[at] = ' ';
|
||||
last_space = &ret[at++];
|
||||
ret[at] = '\0';
|
||||
}
|
||||
|
||||
if (content[i] == '\r' && content[i+1] == '\r') {
|
||||
i+=2;
|
||||
ret[at++] = '\r';
|
||||
ret[at] = '\0';
|
||||
line_count = 0;
|
||||
last_space = NULL;
|
||||
} else if (line_count == cutoff) {
|
||||
|
Reference in New Issue
Block a user