Fix a bug with the greentexts

This commit is contained in:
oobabooga 2023-01-07 01:20:10 -03:00
parent 3aaf5fb4aa
commit 538998b43b

View File

@ -148,7 +148,8 @@ def generate_html(f):
output += '</div>'
output = output.split('\n')
for i in range(len(output)):
output[i] = re.sub('^(&gt;[^\n]*(<br>|</div>))', '<span class="greentext">\\1</span>\n', output[i])
output[i] = re.sub(r'^(&gt;(.*?)(<br>|</div>))', r'<span class="greentext">\1</span>', output[i])
output[i] = re.sub(r'^<blockquote class="message">(&gt;(.*?)(<br>|</div>))', r'<blockquote class="message"><span class="greentext">\1</span>', output[i])
output = '\n'.join(output)
return output