I had
return value.replace("\n","<br>")
.replace("\r","<br>")
.replace("<br><br>","<br>");
which only replaced the first occurence of \n with
I found that, to replace all occurences, I should replace String with /String/g
So I did:
return value.replace("/\n/g","<br>")
.replace("/\r/g","<br>")
.replace("/<br><br>/g","<br>");
But it seems as if I am missing something, since nothing is replaced.
(?:\r?\n|\r)?white-spaceproperty, especially thepre-wrapandpre-linevalues.