method convertNewlinesToParagraphs added. see #482

This commit is contained in:
mic 2025-08-22 23:16:57 +02:00
parent 86a457c01c
commit ad6ac50dc9

View file

@ -239,6 +239,14 @@ function convertBrToNewlines(html) {
return html.replace(/<br\s*\/?>/gi, '\n');
}
export function convertNewlinesToParagraphs(input) {
return input
.split('\n')
.map(line => `<p>${line}</p>`)
.join('');
}
// 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) {