Skip to content
Snippets Groups Projects
Commit 425023e0 authored by Norman Rasmussen's avatar Norman Rasmussen
Browse files

Closes #1231

parent e71989df
No related branches found
No related tags found
No related merge requests found
......@@ -464,11 +464,11 @@ def print_special_text(self, special_text, other_tags):
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 @@ def print_special_text(self, special_text, other_tags):
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 @@ def print_special_text(self, special_text, other_tags):
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 _/ /_
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment