title: How to convert \n to HTML line break
body: <p>I am using this plugin to parse bbcode <a href="https://github.com/wGEric/phpBB-BBCode-Javascript-Parser">bbcodeparser</a></p>
  
  <p>but it has no functionality to convert <code>\n</code> to <code>&lt;br/&gt;</code>.</p>
  
  <p>I tried adding this:</p>
  
  <pre><code>replace(/\r?\n|\r/g, '&lt;br&gt;')
  </code></pre>
  
  <p>...but it didn't work. </p>
  
  <p>How can I implement line break functionality?</p>