Add convertNewlinesToBr function to replace newlines with <br> tags

This commit is contained in:
mic 2025-06-18 22:25:37 +02:00
parent adbdd34070
commit 5c0b011dad

View file

@ -199,6 +199,10 @@ export function stripHtmlKeepLines(htmlString) {
.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
// to the model string used in the webpage
export function getGPTWebModelString(model) {