summaryrefslogtreecommitdiff
path: root/render/box.c
diff options
context:
space:
mode:
authorJames Bursa <james@netsurf-browser.org>2002-12-27 17:28:19 +0000
committerJames Bursa <james@netsurf-browser.org>2002-12-27 17:28:19 +0000
commitc3a910193ff564f49bc5bb7353e0a27a39f2f728 (patch)
tree3e6c750848b13783599aaf3013876fe64f0e2738 /render/box.c
parent8f5c1d0e6e5c0d57d27bd0b2aa953386df9df1f2 (diff)
downloadnetsurf-c3a910193ff564f49bc5bb7353e0a27a39f2f728.tar.gz
netsurf-c3a910193ff564f49bc5bb7353e0a27a39f2f728.tar.bz2
[project @ 2002-12-27 17:28:19 by bursa]
Improved word space handling svn path=/import/netsurf/; revision=60
Diffstat (limited to 'render/box.c')
-rw-r--r--render/box.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/render/box.c b/render/box.c
index 67b21250c..147818d55 100644
--- a/render/box.c
+++ b/render/box.c
@@ -1,5 +1,5 @@
/**
- * $Id: box.c,v 1.20 2002/10/15 10:41:12 monkeyson Exp $
+ * $Id: box.c,v 1.21 2002/12/27 17:28:19 bursa Exp $
*/
#include <assert.h>
@@ -186,6 +186,12 @@ struct box * convert_xml_to_box(xmlNode * n, struct css_style * parent_style,
box = box_create(n, BOX_INLINE, parent_style, href);
box->text = squash_whitespace(tolat1(n->content));
box->length = strlen(box->text);
+ if (box->text[box->length - 1] == ' ') {
+ box->space = 1;
+ box->length--;
+ } else {
+ box->space = 0;
+ }
box->font = font_open(fonts, box->style);
box_add_child(inline_container, box);
} else {