Creating a multi-line file and downloading with Chrome.downloads.download
<p>I'm generating some content client side, and I want to download this generated content using chrome.downloads.download. Note that the download works fine, but somehow the downloaded file is not including the new lines (I'm adding the new lines using</p>

<pre><code>lineContent += '\r\n';
</code></pre>

<p>This doesn't work. I've tried</p>

<pre><code>'\r' or '\n'
</code></pre>

<p>as well, but no luck. Everything except the new line character is correct in the generated document. Any ideas why it might not be able to display the new lines?</p>

<p><strong>I've already tried different editors so I doubt the editor is the reason why it's displaying all of it in a single line.</strong></p>

<pre><code>// when I'm debugging the fileData is showing as multi-lined, but after
// download, all of the content is a single line.
chrome.downloads.download({
            url: "data:text/plain," + fileData,
            filename: 'file.txt',
            conflictAction: "prompt",
            saveAs: true,
            }, function(downloadId) {
                console.log("Downloaded item with ID", downloadId);
        });
</code></pre>