changeset 16932:3d0aec991e5d

Patch #265. Fix to Google Talk formatting
author Sean Egan <seanegan@gmail.com>
date Tue, 08 May 2007 00:28:22 +0000
parents 9a568611fa4a
children 9278933225eb
files libpurple/protocols/jabber/google.c
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/jabber/google.c	Sun May 06 21:55:07 2007 +0000
+++ b/libpurple/protocols/jabber/google.c	Tue May 08 00:28:22 2007 +0000
@@ -398,7 +398,7 @@
 					*(p+1) == '<')) {
 				bold_count++;
 				in_bold = FALSE;
-			} else if (preceding_space && !in_bold) {
+			} else if (preceding_space && !in_bold && !g_unichar_isspace(*(p+1))) {
 				bold_count++;
 				in_bold = TRUE;
 			}
@@ -409,7 +409,7 @@
 					*(p+1) == '<')) {
 				italic_count++;
 				in_italic = FALSE;
-			} else if (preceding_space && !in_italic) {
+			} else if (preceding_space && !in_italic && !g_unichar_isspace(*(p+1))) {
 				italic_count++;
 				in_italic = TRUE;
 			}
@@ -445,7 +445,7 @@
 				str = g_string_append(str, "</b>");
 				in_bold = FALSE;
 				bold_count--;
-			} else if (preceding_space && bold_count > 1) {
+			} else if (preceding_space && bold_count > 1 && !g_unichar_isspace(*(p+1))) {
 				str = g_string_append(str, "<b>");
 				bold_count--;
 				in_bold = TRUE;
@@ -459,7 +459,7 @@
 				str = g_string_append(str, "</i>");
 				italic_count--;
 				in_italic = FALSE;
-			} else if (preceding_space && italic_count > 1) {
+			} else if (preceding_space && italic_count > 1 && !g_unichar_isspace(*(p+1))) {
 				str = g_string_append(str, "<i>");
 				italic_count--;
 				in_italic = TRUE;