From c3a910193ff564f49bc5bb7353e0a27a39f2f728 Mon Sep 17 00:00:00 2001 From: James Bursa Date: Fri, 27 Dec 2002 17:28:19 +0000 Subject: [project @ 2002-12-27 17:28:19 by bursa] Improved word space handling svn path=/import/netsurf/; revision=60 --- render/box.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'render/box.c') 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 @@ -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 { -- cgit v1.2.3