JSFiddle - React, Tailwind, and code Playground
by Xeon06
HTML
<textarea></textarea>
<input type="button" value="Go">
<div></div>
CSS
textarea {
width: 400px;
height: 200px;
}
JavaScript
$("input").click(function() {
var text = $("textarea").val();
while(text.indexOf("\n\n") > 0)
text = text.replace("\n\n", "\n");
text = $.trim(text);
});