diff --git a/js/mzta-utils.js b/js/mzta-utils.js index 772aa8a2..5596eaa2 100644 --- a/js/mzta-utils.js +++ b/js/mzta-utils.js @@ -239,6 +239,14 @@ function convertBrToNewlines(html) { return html.replace(//gi, '\n'); } +export function convertNewlinesToParagraphs(input) { + return input + .split('\n') + .map(line => `

${line}

`) + .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) {