changeset 224:1fcd0e589b9e

revised the recipient pattern. new pattern can handle: - recipient name surrounded by non ascii characters without any space. - recipient name accidentally escaped with '.' such as ".@foo".
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Sat, 06 Sep 2008 23:47:17 +0900
parents c3efae72f72a
children 1ef5aa4883a1
files pidgin-twitter.h
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin-twitter.h	Sat Sep 06 18:37:30 2008 +0900
+++ b/pidgin-twitter.h	Sat Sep 06 23:47:17 2008 +0900
@@ -147,7 +147,7 @@
 #define EMPTY                   ""
 
 /* patterns */
-#define P_RECIPIENT         "(^|\\s+)@([A-Za-z0-9_]+)"
+#define P_RECIPIENT         "(^|\\s+|[.[:^print:]])@([A-Za-z0-9_]+)"
 #define P_SENDER            "^(\\r?\\n?)\\s*([A-Za-z0-9_]+)(?:\\s*\\(.+\\))?: "
 #define P_COMMAND           "^(?:\\s*)([dDfFgGlLmMnNtTwW]{1}\\s+[A-Za-z0-9_]+)(?:\\s*\\Z)"
 #define P_PSEUDO            "^\\s*(?:[\"#$%&'()*+,\\-./:;<=>?\\[\\\\\\]_`{|}~]|[^\\s\\x21-\\x7E])*([dDfFgGlLmMnNtTwW]{1})(?:\\Z|\\s+|[^\\x21-\\x7E]+\\Z)"