title: Remove sinlge new lines
body: <p>I want to replace single new lines with one space like if I have string like this:</p>
  
  <pre><code>"foo\nbar\nbaz\n\nquux"
  </code></pre>
  
  <p>I want to have </p>
  
  <pre><code>"foo bar baz\n\nquux"
  </code></pre>
  
  <p>I've tried this regex: <code>/\n(?!\n)/</code> but it don't work it replace single new line by space but also one new line that have new line after.</p>