diff pidgin-twitter.h @ 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 fd0948c7078e
children 42cdddf0f747
line wrap: on
line diff
--- a/pidgin-twitter.h	Sun Apr 19 13:52:03 2009 +0900
+++ b/pidgin-twitter.h	Sat Apr 25 22:27:13 2009 +0900
@@ -160,7 +160,7 @@
 #define SENDER_FORMAT_JISKO     "%s<a href='http://jisko.net/%s'>%s</a>: "
 #define CHANNEL_FORMAT_WASSR    "%s<a href='http://wassr.jp/channel/%s'>%s</a> "
 #define CHANNEL_FORMAT_IDENTICA "%s<a href='http://identi.ca/tag/%s'>%s</a> "
-#define TAG_FORMAT_TWITTER      "<a href='http://twitter.com/search?q=%%23%s'>#%s</a>"
+#define TAG_FORMAT_TWITTER      "%s<a href='http://twitter.com/search?q=%%23%s'>#%s</a>"
 #define TAG_FORMAT_IDENTICA     "#<a href='http://identi.ca/tag/%s'>%s</a>"
 #define GROUP_FORMAT_IDENTICA   "!<a href='http://identi.ca/group/%s'>%s</a>"
 
@@ -175,10 +175,10 @@
 #define P_PSEUDO            "^\\s*(?:[\"#$%&'()*+,\\-./:;<=>?\\[\\\\\\]_`{|}~]|[^\\s\\x21-\\x7E])*([dDfFgGlLmMnNtTwW]{1})(?:\\Z|\\s+|[^\\x21-\\x7E]+\\Z)"
 #define P_USER              "^.*?(?:<a .+?>)?([-A-Za-z0-9_]+)(?:</a>)?:"
 #define P_CHANNEL           "^(.*?(?:<a .+?>)?[-A-Za-z0-9_]+(?:</a>)?: \\r?\\n?#)([A-Za-z0-9_]+) "
-#define P_TAG_TWITTER       "#([-A-Za-z0-9_]+)"
+#define P_TAG_TWITTER       "(^|\\s+)#([-A-Za-z0-9_]+)"
 #define P_TAG_IDENTICA      "#([-A-Za-z0-9_]+)"
 #define P_GROUP_IDENTICA    "!([-A-Za-z0-9_]+)"
-#define P_IMAGE_TWITTER   "<img .*=\"profile-(?:image|img)\".*src=\"(https?://.+?)\".*/>"
+#define P_IMAGE_TWITTER     "<img .*=\"profile-(?:image|img)\".*src=\"(https?://.+?)\".*/>"
 #define P_IMAGE_WASSR       "<div class=\"image\"><a href=\".+\"><img src=\"(.+)\" width=\".+?\" /></a></div>"
 #define P_IMAGE_IDENTICA    "<img src=\"(https?://.+.identi.ca/.+)\" class=\"avatar profile photo\" width=\"96\" height=\"96\" alt=\"[A-Za-z0-9_]+\"/>"
 #define P_IMAGE_JISKO       "<img src=\"(https?://jisko.net/users/.+/img/avatar/thumb_side\\..+)\" alt=\"Avatar\" />"