Fixed regex so that we should get the username in TweetPane, so new tweets won't increment the unread count if they are from the user herself
This commit is contained in:
@ -23,7 +23,7 @@ class TweetPane(gtk.ScrolledWindow):
|
||||
# If the username is encoded in the tweet pane's name, we really want
|
||||
# to use it instead, since it may not match the current api's name
|
||||
if re.search(r'(^| ).*/', list_name):
|
||||
self.username = re.sub(r'(list: | )(.*?)/.*$', r'\2', list_name)
|
||||
self.username = re.sub(r'(list: | )?(.*?)/.*$', r'\2', list_name)
|
||||
else:
|
||||
self.username = username
|
||||
|
||||
@ -471,7 +471,7 @@ class TweetBox(gtk.HBox):
|
||||
new_text = re.sub(r'"([^;]*?)( |$)', r'"\1\2', new_text)
|
||||
if gtk.gtk_version[0] > 2 or (gtk.gtk_version[0] == 2 and gtk.gtk_version[1] >= 18):
|
||||
# Make URLs into links
|
||||
new_text = re.sub(r"(http://.*?)([^0-9a-zA-Z.~/-_]|$)", r'<a href="\1">\1</a>\2', new_text)
|
||||
new_text = re.sub(r"(http://.*?)([^0-9a-zA-Z.~/_-]|$)", r'<a href="\1">\1</a>\2', new_text)
|
||||
# Make @ or # refs into links, to be used internally
|
||||
new_text = re.sub(r'@(.*?)([^0-9a-zA-Z_]|$)', self._make_user_link, new_text)
|
||||
new_text = re.sub(r'#(.*?)([^0-9a-zA-Z_-]|$)', self._make_hashtag_link, new_text)
|
||||
|
Reference in New Issue
Block a user