Skip to content

Commit a4ae3d3

Browse files
a-haritilforst
authored andcommitted
fix: limit code block line formatting to 80 chars (#10157)
1 parent 4eabafc commit a4ae3d3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/remark-format-code.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,11 @@ async function formatCode(node) {
4343
}
4444

4545
try {
46-
const formattedCode = await format(node.value, {...prettierConfig, ...parserConfig});
46+
const formattedCode = await format(node.value, {
47+
...prettierConfig,
48+
...parserConfig,
49+
printWidth: 80,
50+
});
4751
// get rid of the trailing newline
4852
node.value = formattedCode.trimEnd();
4953
} catch (e) {

0 commit comments

Comments
 (0)