diff main.c @ 299:d68ed289ef69

#tag should be interpreted as search tag only if it appears in the beginning of line or it is separated by white space.
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Sat, 25 Apr 2009 22:27:13 +0900
parents e07f28bed8a8
children 42cdddf0f747
line wrap: on
line diff
--- a/main.c	Sun Apr 19 13:52:03 2009 +0900
+++ b/main.c	Sat Apr 25 22:27:13 2009 +0900
@@ -217,11 +217,12 @@
         g_free(match2);
     }
     else if(which == TAG_TWITTER && service == twitter_service) {
-        gchar *match = g_match_info_fetch(match_info, 1);
-        gchar *link = g_ascii_strdown(match, -1);
-        g_snprintf(sub, SUBST_BUF_SIZE, TAG_FORMAT_TWITTER, link, match);
-        g_free(match);
-        g_free(link);
+        gchar *match1 = g_match_info_fetch(match_info, 1); /* white space */
+        gchar *match2 = g_match_info_fetch(match_info, 2); /* search tag */
+        const gchar *format = TAG_FORMAT_TWITTER;
+        g_snprintf(sub, SUBST_BUF_SIZE, format, match1 ? match1: "", match2, match2);
+        g_free(match1);
+        g_free(match2);
     }
     else if(which == TAG_IDENTICA && service == identica_service) {
         gchar *match = g_match_info_fetch(match_info, 1);
@@ -1286,7 +1287,7 @@
     PURPLE_PRIORITY_DEFAULT,    /**< priority	*/
     PLUGIN_ID,                  /**< id     */
     "Pidgin-Twitter",           /**< name	*/
-    "0.8.3",                    /**< version	*/
+    "0.8.4d1",                    /**< version	*/
     "provides useful features for twitter", /**  summary	*/
     "provides useful features for twitter", /**  desc	*/
     "Yoshiki Yazawa, mikanbako, \nKonosuke Watanabe, IWATA Ray, \nmojin, umq, \nthe pidging-twitter team",     /**< author	*/