Mercurial > pidgin-twitter
changeset 229:29c741b1b921
supports identi.ca's quirky tag notation.
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Sat, 27 Sep 2008 15:14:30 +0900 |
parents | 666629903fa9 |
children | a73dae7d8d78 |
files | pidgin-twitter.c pidgin-twitter.h |
diffstat | 2 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/pidgin-twitter.c Sat Sep 27 01:42:39 2008 +0900 +++ b/pidgin-twitter.c Sat Sep 27 15:14:30 2008 +0900 @@ -954,9 +954,12 @@ } else if(which == TAG_IDENTICA && service == identica_service) { gchar *match = g_match_info_fetch(match_info, 1); + gchar *link = g_ascii_strdown(match, -1); + purple_str_strip_char(link, '_'); const gchar *format = TAG_FORMAT_IDENTICA; - g_snprintf(sub, SUBST_BUF_SIZE, format, match, match); + g_snprintf(sub, SUBST_BUF_SIZE, format, link, match); g_free(match); + g_free(link); } g_string_append(result, sub);
--- a/pidgin-twitter.h Sat Sep 27 01:42:39 2008 +0900 +++ b/pidgin-twitter.h Sat Sep 27 15:14:30 2008 +0900 @@ -154,7 +154,7 @@ #define P_IMAGE_TWITTER "<a href=\"/account/profile_image/.+?\"><img .+? id=\"profile-image\".*src=\"(http://.+)\" .+?/>" #define P_IMAGE_WASSR "<div class=\"image\"><a href=\".+\"><img src=\"(.+)\" width=\".+?\" /></a></div>" #define P_IMAGE_IDENTICA "<img src=\"(http://.+.identi.ca/.+)\" class=\"avatar profile\" width=\"96\" height=\"96\" alt=\"[A-Za-z0-0_]+\"/>" -#define P_TAG_IDENTICA "#([A-Za-z0-9]+)" +#define P_TAG_IDENTICA "#([A-Za-z0-9_]+)" #define P_SIZE_128_WASSR "\\.128\\." /* twitter API specific macros */