Support models that are formatted with CRLF
A new model was released that uses a different formatting for its enters, this causes to many enters in the UI. In this change we fix the issue so that when this happens the UI still displays the content as you would expect. Removing the formatting burden from the Model developers.
This commit is contained in:
parent
b79e79905b
commit
6520cac75d
|
@ -1384,7 +1384,7 @@ def sendtocolab(txt, min, max):
|
||||||
# Replaces returns and newlines with HTML breaks
|
# Replaces returns and newlines with HTML breaks
|
||||||
#==================================================================#
|
#==================================================================#
|
||||||
def formatforhtml(txt):
|
def formatforhtml(txt):
|
||||||
return txt.replace("\\r", "<br/>").replace("\\n", "<br/>").replace('\n', '<br/>').replace('\r', '<br/>')
|
return txt.replace("\\r\\n", "<br/>").replace("\\r", "<br/>").replace("\\n", "<br/>").replace("\r\n", "<br/>").replace('\n', '<br/>').replace('\r', '<br/>')
|
||||||
|
|
||||||
#==================================================================#
|
#==================================================================#
|
||||||
# Strips submitted text from the text returned by the AI
|
# Strips submitted text from the text returned by the AI
|
||||||
|
|
Loading…
Reference in New Issue