Mark both latest patches as forwarded
[debian/pino.git] / debian / patches / 004_fix-search-regex.diff
1 Description: Fix regex for search/tags
2 Author: Julien Valroff <julien@kirya.net>
3 Bug: http://code.google.com/p/pino-twitter/issues/detail?id=141
4 Forwarded: yes
5
6 Index: pino/src/template.vala
7 ===================================================================
8 --- pino.orig/src/template.vala 2010-05-23 15:26:40.000000000 +0200
9 +++ pino/src/template.vala      2010-05-23 15:29:14.000000000 +0200
10 @@ -60,7 +60,7 @@
11                 
12                 //compile regex
13                 nicks = new Regex("(^|\\s)@([A-Za-z0-9_]+)");
14 -               tags = new Regex("((^|\\s)\\#[A-Za-z0-9_\\p{Latin}\\p{Greek}]+)");
15 +               tags = new Regex("(^|\\s)#([A-Za-z0-9_\\p{Latin}\\p{Greek}]+)");
16                 groups = new Regex("(^|\\s)!([A-Za-z0-9_]+)"); //for identi.ca groups
17                 urls = new Regex("((http|https|ftp)://([\\S]+))"); //need something better
18                 
19 @@ -400,7 +400,7 @@
20                 }
21                 
22                 result = nicks.replace(result, -1, 0, "\\1@<a class='re_nick' href='userinfo://\\2'>\\2</a>");
23 -               result = tags.replace(result, -1, 0, "<a class='tags' href='%s\\1'>\\1</a>".printf(search_url));
24 +               result = tags.replace(result, -1, 0, "\\1#<a class='tags' href='%s\\2'>\\2</a>".printf(search_url));
25                 
26                 if(service == "identi.ca") //for identi.ca only
27                         result = groups.replace(result, -1, 0, "\\1!<a class='tags' href='http://identi.ca/group/\\2'>\\2</a>");