[gwibber/f14/master] fix unicode hash coloring

Tom Callaway spot at fedoraproject.org
Fri Mar 25 21:08:53 UTC 2011


commit 3e4fdb3e221098dd1e35e66e27e25d316edb1766
Author: Tom "spot" Callaway <tcallawa at redhat.com>
Date:   Fri Mar 25 17:10:21 2011 -0400

    fix unicode hash coloring

 gwibber-2.91.92-kitchen-unicode-hash.patch |   14 ++++++++++++++
 gwibber.spec                               |   10 +++++++++-
 2 files changed, 23 insertions(+), 1 deletions(-)
---
diff --git a/gwibber-2.91.92-kitchen-unicode-hash.patch b/gwibber-2.91.92-kitchen-unicode-hash.patch
new file mode 100644
index 0000000..83209ee
--- /dev/null
+++ b/gwibber-2.91.92-kitchen-unicode-hash.patch
@@ -0,0 +1,14 @@
+diff -up gwibber-2.91.92/gwibber/microblog/util/__init__.py.kitchen-hash gwibber-2.91.92/gwibber/microblog/util/__init__.py
+--- gwibber-2.91.92/gwibber/microblog/util/__init__.py.kitchen-hash	2011-03-25 17:01:48.045113002 -0400
++++ gwibber-2.91.92/gwibber/microblog/util/__init__.py	2011-03-25 17:03:46.061113003 -0400
+@@ -32,8 +32,8 @@ URL_FORMAT = (r'(?<!\w)(((?:%s)://|(?:ww
+     ')') % ('|'.join(URL_SCHEMES),)
+ 
+ PARSE_LINK = re.compile(URL_FORMAT, re.U)
+-PARSE_NICK = re.compile("\B@([A-Za-z0-9_]+|@[A-Za-z0-9_]$)")
+-PARSE_HASH = re.compile("\B#([A-Za-z0-9_\-]+|@[A-Za-z0-9_\-]$)")
++PARSE_NICK = re.compile("\B@([\w]+|@[\w]$)", re.UNICODE)
++PARSE_HASH = re.compile("\B#([\w\-]+|@[\w\-]$)", re.UNICODE)
+ PARSE_URLS = re.compile(r"<[^<]*?/?>") 
+ 
+ def strip_urls(text):
diff --git a/gwibber.spec b/gwibber.spec
index 3a343fb..2d66a25 100644
--- a/gwibber.spec
+++ b/gwibber.spec
@@ -4,7 +4,7 @@
 
 Name:           gwibber
 Version:        2.91.92
-Release:        1%{?dist}
+Release:        2%{?dist}
 Epoch:          1
 Summary:        An open source microblogging client for GNOME developed with Python and GTK
 Group:          Applications/Internet
@@ -59,6 +59,9 @@ Patch17:	gwibber-2.91.92-NetworkManager-0.9.patch
 # Properly grab the "likes count" for facebook items
 Patch18:	gwibber-2.91.92-facebook-likes-count.patch
 
+# Fix hash tag parsing for unicode
+Patch19:	gwibber-2.91.92-kitchen-unicode-hash.patch
+
 # Gowalla support
 Patch40:	gwibber-2.91.92-gowalla.patch
 Patch41:	gwibber-2.91.92-gowalla-icons.patch
@@ -114,6 +117,8 @@ and GTK. It supports Twitter, Jaiku, Identi.ca, Facebook, and Digg.
 
 %patch18 -p1 -b .likes-count
 
+%patch19 -p1 -b .kitchen-hash
+
 # Gowalla
 %patch40 -p1 -b .gowalla
 %patch41 -p1 -b .gowalla-icons
@@ -171,6 +176,9 @@ rm -rf %{buildroot}
 %{_datadir}/indicators/messages/applications/gwibber
 
 %changelog
+* Thu Mar 24 2011 Tom Callaway <spot at fedoraproject.org> - 1:2.91.92-2
+- fix hash tag parsing of unicode tags
+
 * Thu Mar 24 2011 Tom Callaway <spot at fedoraproject.org> - 1:2.91.92-1
 - update to 2.91.92
 


More information about the scm-commits mailing list