I have a piece of text that comes from the backend with /n string in it, but I hope I can replace this with a lot of ways I found on the Internet, but I still can't replace it with a label smoothly, does anyone know the reason Caused?
Thanks for your help.
let demo = document.querySelector('.demo').textContent;
console.log(demo)
demo.replace(new RegExp('\r?\n','g'), '<br />');
<p class="demo">尚有 1 個職缺使用母公司的點數,\n關閉後才可解除綁定</p>