Mercurial > pidgin.yaz
changeset 10217:6f49ce1d394d
[gaim-migrate @ 11345]
Daniel Westermann-Clark wrote a patch so we wouldn't insert spaces after
br tags, because that's bad. This is it.
I consider this, and what Sean did to cause it, hacks, but then I don't
feel like making us deal with whitespace better (which probably involves
implementing some style properties or something).
I wonder if Mr. Westermann-Clark goes under W or C.
committer: Tailor Script <tailor@pidgin.im>
author | Tim Ringenbach <marv@pidgin.im> |
---|---|
date | Sat, 20 Nov 2004 06:03:21 +0000 |
parents | 09876d57c520 |
children | 6071dfe17d14 |
files | COPYRIGHT src/gtkimhtml.c |
diffstat | 2 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/COPYRIGHT Sat Nov 20 05:12:59 2004 +0000 +++ b/COPYRIGHT Sat Nov 20 06:03:21 2004 +0000 @@ -180,6 +180,7 @@ Eric Warmenhoven Andrew Wellington Dave West +Daniel Westermann-Clark Andrew Whewell Dan Willemsen Jason Willis
--- a/src/gtkimhtml.c Sat Nov 20 05:12:59 2004 +0000 +++ b/src/gtkimhtml.c Sat Nov 20 06:03:21 2004 +0000 @@ -2009,6 +2009,8 @@ title = 0, pre = 0; + gboolean br = FALSE; + GSList *fonts = NULL; GObject *object; GtkIMHtmlScalable *scalable = NULL; @@ -2026,6 +2028,7 @@ c++; pos++; ws[wpos] = '\0'; + br = FALSE; switch (type) { case 1: /* B */ @@ -2149,6 +2152,7 @@ case 61: /* BR (opt) */ ws[wpos] = '\n'; wpos++; + br = TRUE; break; case 26: /* HR */ case 42: /* HR (opt) */ @@ -2559,7 +2563,7 @@ ws[0] = '\0'; wpos = 0; /* NEW_BIT (NEW_TEXT_BIT); */ - } else { + } else if (!br) { /* Don't insert a space immediately after an HTML break */ /* A newline is defined by HTML as whitespace, which means we have to replace it with a word boundary. * word breaks vary depending on the language used, so the correct thing to do is to use Pango to determine * what language this is, determine the proper word boundary to use, and insert that. I'm just going to insert