tit
you are viewing a single comment - view all comments
  • print(t, len(text)) if t == 0: new_text += clean_and_linkify(text[t]) else: @@ -184,6 +190,15 @@ def pseudo_markup(text, escape_only=False): clean_text = new_text else: clean_text = clean_and_linkify(text) # remove the line placeholder clean_text = clean_text.replace(random_sequence, '') clean_text = clean_text.replace('\n', '<br>') # html tags that should not end in <br> clean_tags = ['<ol>', '</ol>', '<li>', '</li>', '<ul>', '</ul>'] for tag in clean_tags: clean_text = clean_text.replace(tag + '<br>', tag) return clean_text
    1
    reply