mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-12-23 21:18:00 +01:00
Fix a bug with the greentexts
This commit is contained in:
parent
3aaf5fb4aa
commit
538998b43b
@ -148,7 +148,8 @@ def generate_html(f):
|
||||
output += '</div>'
|
||||
output = output.split('\n')
|
||||
for i in range(len(output)):
|
||||
output[i] = re.sub('^(>[^\n]*(<br>|</div>))', '<span class="greentext">\\1</span>\n', output[i])
|
||||
output[i] = re.sub(r'^(>(.*?)(<br>|</div>))', r'<span class="greentext">\1</span>', output[i])
|
||||
output[i] = re.sub(r'^<blockquote class="message">(>(.*?)(<br>|</div>))', r'<blockquote class="message"><span class="greentext">\1</span>', output[i])
|
||||
output = '\n'.join(output)
|
||||
|
||||
return output
|
||||
|
Loading…
Reference in New Issue
Block a user