javascript turn single line break to double line break
- by Eric Sim
Hm... I'm trying to convert single line break into double line break, as in
This is a sentence.
This is another sentence.
into
This is a sentence.
This is another sentence.
Apparently this doesn't work ThisContent = ThisContent.replace(/(\n)/gm, "\n\n"); since it replace everything, including double line breaks.
What's the regex to do this?