Add patch to improve the regex used for identi.ca groups
authorJulien Valroff <julien@kirya.net>
Tue, 8 Jun 2010 17:24:14 +0000 (19:24 +0200)
committerJulien Valroff <julien@kirya.net>
Tue, 8 Jun 2010 17:24:14 +0000 (19:24 +0200)
debian/patches/007_improve-group-regex.diff [new file with mode: 0644]
debian/patches/series

diff --git a/debian/patches/007_improve-group-regex.diff b/debian/patches/007_improve-group-regex.diff
new file mode 100644 (file)
index 0000000..5759823
--- /dev/null
@@ -0,0 +1,15 @@
+Description: Improve the regex used for identi.ca groups
+Author: Julien Valroff <julien@kirya.net>
+Forwarded: no
+
+--- a/src/template.vala
++++ b/src/template.vala
+@@ -61,7 +61,7 @@
+               //compile regex
+               nicks = new Regex("(^|\\s)@([A-Za-z0-9_]+)");
+               tags = new Regex("(^|\\s|'|\\()#([A-Za-z0-9_-.\\p{Latin}\\p{Greek}]+)");
+-              groups = new Regex("(^|\\s)!([A-Za-z0-9_]+)"); //for identi.ca groups
++              groups = new Regex("(^|\\s|'|\\()!([A-Za-z0-9_]+)"); //for identi.ca groups
+               urls = new Regex("((https?|ftp)://([A-Za-z0-9+&@#/%?=~_|!:,.;-]*)([A-Za-z0-9+&@#/%=~_|$]))"); // still needs to be improved for urls containing () such as wikipedia
+               
+               // characters must be cleared to know direction of text
index 8965983..e948d4d 100644 (file)
@@ -4,3 +4,4 @@
 004_allow-current-user-info.diff
 005_startup-notify.diff
 006_improve-url-regex.diff
+007_improve-group-regex.diff