Skip to content

Commit 8ab8a45

Browse files
authored
fix: Remove CR (\r) from generated content (#1444)
1 parent ccd4aca commit 8ab8a45

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docgen/post-process.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ async function fixTitleOf(file) {
9090

9191
if (updated) {
9292
console.log(`Updating title in ${file}`);
93-
const content = Buffer.from(buffer.join('\r\n'));
93+
const content = Buffer.from(buffer.join('\n'));
9494
await fs.writeFile(file, content);
9595
}
9696
}
@@ -110,7 +110,7 @@ async function fixTocTitles(file) {
110110
}
111111

112112
console.log(`Updating titles in ${file}`);
113-
const content = Buffer.from(buffer.join('\r\n'));
113+
const content = Buffer.from(buffer.join('\n'));
114114
await fs.writeFile(file, content);
115115
}
116116

@@ -166,7 +166,7 @@ async function writeExtraContentTo(target, extra) {
166166
output.push(line);
167167
}
168168

169-
const outputBuffer = Buffer.from(output.join('\r\n'));
169+
const outputBuffer = Buffer.from(output.join('\n'));
170170
console.log(`Writing extra content to ${target}`);
171171
await fs.writeFile(target, outputBuffer);
172172
}

0 commit comments

Comments
 (0)