method convertNewlinesToParagraphs added. see #482
This commit is contained in:
parent
86a457c01c
commit
ad6ac50dc9
1 changed files with 8 additions and 0 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue