This commit is contained in:
Norman Rasmussen 2005-12-08 18:28:35 +00:00
parent e71989dfa0
commit 425023e05c
1 changed files with 6 additions and 6 deletions

View File

@ -464,11 +464,11 @@ class ConversationTextview(gtk.TextView):
use_other_tags = False
elif special_text.startswith('*'): # it's a bold text
tags.append('bold')
if special_text[1] == '/': # it's also italic
if special_text[1] == '/' and special_text[-2] == '/' and len(special_text) > 4: # it's also italic
tags.append('italic')
if not show_ascii_formatting_chars:
special_text = special_text[2:-2] # remove */ /*
elif special_text[1] == '_': # it's also underlined
elif special_text[1] == '_' and special_text[-2] == '_' and len(special_text) > 4: # it's also underlined
tags.append('underline')
if not show_ascii_formatting_chars:
special_text = special_text[2:-2] # remove *_ _*
@ -477,11 +477,11 @@ class ConversationTextview(gtk.TextView):
special_text = special_text[1:-1] # remove * *
elif special_text.startswith('/'): # it's an italic text
tags.append('italic')
if special_text[1] == '*': # it's also bold
if special_text[1] == '*' and special_text[-2] == '*' and len(special_text) > 4: # it's also bold
tags.append('bold')
if not show_ascii_formatting_chars:
special_text = special_text[2:-2] # remove /* */
elif special_text[1] == '_': # it's also underlined
elif special_text[1] == '_' and special_text[-2] == '_' and len(special_text) > 4: # it's also underlined
tags.append('underline')
if not show_ascii_formatting_chars:
special_text = special_text[2:-2] # remove /_ _/
@ -490,11 +490,11 @@ class ConversationTextview(gtk.TextView):
special_text = special_text[1:-1] # remove / /
elif special_text.startswith('_'): # it's an underlined text
tags.append('underline')
if special_text[1] == '*': # it's also bold
if special_text[1] == '*' and special_text[-2] == '*' and len(special_text) > 4: # it's also bold
tags.append('bold')
if not show_ascii_formatting_chars:
special_text = special_text[2:-2] # remove _* *_
elif special_text[1] == '/': # it's also italic
elif special_text[1] == '/' and special_text[-2] == '/' and len(special_text) > 4: # it's also italic
tags.append('italic')
if not show_ascii_formatting_chars:
special_text = special_text[2:-2] # remove _/ /_