Fix commit 3f5fb3a5aa8eb893e84bc0241d0772ae8ac61866
[debian/pino.git] / debian / patches / 007_improve-group-regex.diff
1 Description: Improve the regex used for identi.ca groups
2 Author: Julien Valroff <julien@kirya.net>
3 Forwarded: no
4
5 --- a/src/template.vala
6 +++ b/src/template.vala
7 @@ -61,7 +61,7 @@
8                 //compile regex
9                 nicks = new Regex("(^|\\s)@([A-Za-z0-9_]+)");
10                 tags = new Regex("(^|\\s|'|\\()#([A-Za-z0-9_.-\\p{Latin}\\p{Greek}]+)");
11 -               groups = new Regex("(^|\\s)!([A-Za-z0-9_]+)"); //for identi.ca groups
12 +               groups = new Regex("(^|\\s|'|\\()!([A-Za-z0-9_]+)"); //for identi.ca groups
13                 urls = new Regex("((https?|ftp)://([A-Za-z0-9+&@#/%?=~_|!:,.;-]*)([A-Za-z0-9+&@#/%=~_|$]))"); // still needs to be improved for urls containing () such as wikipedia
14                 
15                 // characters must be cleared to know direction of text