changeset ca2800ac665f in /home/hg/repos/gajim
details:http://hg.gajim.org/gajim?cmd=changeset;node=ca2800ac665f
description: Fix special text parsing again
diffstat:
src/conversation_textview.py | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diffs (30 lines):
diff -r 7f9aa1be8e3b -r ca2800ac665f src/conversation_textview.py
--- a/src/conversation_textview.py Fri Nov 26 22:10:57 2010 +0300
+++ b/src/conversation_textview.py Fri Nov 26 22:57:32 2010 +0300
@@ -1076,19 +1076,19 @@
self.images.append(img)
# add with possible animation
self.tv.add_child_at_anchor(img, anchor)
- if not is_xhtml_link:
- if special_text.startswith('www.') or \
+ elif special_text.startswith('www.') or \
special_text.startswith('ftp.') or \
- text_is_valid_uri:
+ text_is_valid_uri and not is_xhtml_link:
tags.append('url')
- elif special_text.startswith('mailto:'):
+ elif special_text.startswith('mailto:') and not is_xhtml_link:
tags.append('mail')
- elif special_text.startswith('xmpp:'):
+ elif special_text.startswith('xmpp:') and not is_xhtml_link:
tags.append('xmpp')
- elif gajim.interface.sth_at_sth_dot_sth_re.match(special_text):
+ elif gajim.interface.sth_at_sth_dot_sth_re.match(special_text) and\
+ not is_xhtml_link:
# it's a JID or mail
tags.append('sth_at_sth')
- if special_text.startswith('*'): # it's a bold text
+ elif special_text.startswith('*'): # it's a bold text
tags.append('bold')
if special_text[1] == '/' and special_text[-2] == '/' and\
len(special_text) > 4: # it's also italic
_______________________________________________
Commits mailing list
[email protected]
http://lists.gajim.org/cgi-bin/listinfo/commits