From bcd07fb2a2d55672d511a5e4b7d09735d515092d Mon Sep 17 00:00:00 2001 From: Hiranya Jayathilaka Date: Thu, 30 Sep 2021 14:49:26 -0700 Subject: [PATCH] fix: Remove CR (\r) from generated content --- docgen/post-process.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docgen/post-process.js b/docgen/post-process.js index 4012797471..9c0a79bdcd 100644 --- a/docgen/post-process.js +++ b/docgen/post-process.js @@ -90,7 +90,7 @@ async function fixTitleOf(file) { if (updated) { console.log(`Updating title in ${file}`); - const content = Buffer.from(buffer.join('\r\n')); + const content = Buffer.from(buffer.join('\n')); await fs.writeFile(file, content); } } @@ -110,7 +110,7 @@ async function fixTocTitles(file) { } console.log(`Updating titles in ${file}`); - const content = Buffer.from(buffer.join('\r\n')); + const content = Buffer.from(buffer.join('\n')); await fs.writeFile(file, content); } @@ -166,7 +166,7 @@ async function writeExtraContentTo(target, extra) { output.push(line); } - const outputBuffer = Buffer.from(output.join('\r\n')); + const outputBuffer = Buffer.from(output.join('\n')); console.log(`Writing extra content to ${target}`); await fs.writeFile(target, outputBuffer); }