Add convertNewlinesToBr function to replace newlines with <br> tags
This commit is contained in:
parent
adbdd34070
commit
5c0b011dad
1 changed files with 4 additions and 0 deletions
|
|
@ -199,6 +199,10 @@ export function stripHtmlKeepLines(htmlString) {
|
||||||
.trim(); // removes leading/trailing whitespace
|
.trim(); // removes leading/trailing whitespace
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function convertNewlinesToBr(text) {
|
||||||
|
return text.replace(/\n/g, '<br>');
|
||||||
|
}
|
||||||
|
|
||||||
// This method is used to convert the model string id used in the URL
|
// This method is used to convert the model string id used in the URL
|
||||||
// to the model string used in the webpage
|
// to the model string used in the webpage
|
||||||
export function getGPTWebModelString(model) {
|
export function getGPTWebModelString(model) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue