Skip to content

Commit 3219100

Browse files
committed
add the missing lineBreak option to the pretty call in the renders
1 parent d67ba47 commit 3219100

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

packages/render/src/browser/render.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,9 @@ export const render = async (node: React.ReactNode, options?: Options) => {
7070
const document = `${doctype}${html.replace(/<!DOCTYPE.*?>/, '')}`;
7171

7272
if (options?.pretty) {
73-
return pretty(document);
73+
return pretty(document, {
74+
lineBreak: '\n',
75+
});
7476
}
7577

7678
return document;

packages/render/src/node/render.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ export const render = async (node: React.ReactNode, options?: Options) => {
4444
const document = `${doctype}${html.replace(/<!DOCTYPE.*?>/, '')}`;
4545

4646
if (options?.pretty) {
47-
return pretty(document);
47+
return pretty(document, {
48+
lineBreak: '\n',
49+
});
4850
}
4951

5052
return document;

0 commit comments

Comments
 (0)