mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-11-23 14:59:47 +03:00
[project @ 2006-03-26 23:52:22 by dsilvers]
Allow white-space: pre* elements to consume one initial new line to make rendering neater svn path=/import/netsurf/; revision=2191
This commit is contained in:
parent
1c1c7d4332
commit
c15a9ebee7
@ -624,6 +624,17 @@ bool box_construct_text(xmlNode *n, struct content *content,
|
||||
box_text_transform(text, strlen(text),
|
||||
parent_style->text_transform);
|
||||
current = text;
|
||||
|
||||
/* swallow a single leading new line */
|
||||
switch (*current) {
|
||||
case '\n':
|
||||
current++; break;
|
||||
case '\r':
|
||||
current++;
|
||||
if (*current == '\n') current++;
|
||||
break;
|
||||
}
|
||||
|
||||
do {
|
||||
size_t len = strcspn(current, "\r\n");
|
||||
char old = current[len];
|
||||
|
Loading…
Reference in New Issue
Block a user