Line breaks in strapi

text = text.replace(/\n/gi, “
\n”);
this worked for me