diff pidgin-twitter.h @ 336:8de140bc8d13

better handling of non-ascii tag. now it properly handles tags in which the first ascii latter occurs in the beginning or mid of a non-ascii word.
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Wed, 14 Oct 2009 14:55:55 +0900
parents dff611cb9f7b
children cdcfdf6a15fb
line wrap: on
line diff
--- a/pidgin-twitter.h	Tue Oct 13 14:07:55 2009 +0900
+++ b/pidgin-twitter.h	Wed Oct 14 14:55:55 2009 +0900
@@ -186,7 +186,7 @@
 #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       "(^|\\s+)#([-A-Za-z0-9_]+|\\S+_)"
+#define P_TAG_TWITTER       "(^|\\s+)#([^-A-Za-z0-9_]*[-A-Za-z0-9_]+\\S*)"
 #define P_TAG_IDENTICA      "#([-A-Za-z0-9_]+)"
 #define P_GROUP_IDENTICA    "!([-A-Za-z0-9_]+)"
 #define P_IMAGE_TWITTER     "<profile_image_url>(https?://.+?)</profile_image_url>"