Skip to content

Commit 0c3703c

Browse files
committed
Preserve line break
1 parent ee7be8c commit 0c3703c

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/formatter/formatTree.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ describe('formatTree', () => {
77
it('should format the node as a root node', () => {
88
const tree = {};
99
const options = {};
10+
1011
const result = formatTree(tree, options);
1112

1213
expect(formatTreeNode).toHaveBeenCalledWith(tree, false, 0, options);

src/formatter/sortPropsByNames.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ export default (shouldSortUserProps: boolean) =>
44
(props: string[]): string[] => {
55
const haveKeyProp = props.includes('key');
66
const haveRefProp = props.includes('ref');
7+
78
const userPropsOnly = props.filter((oneProp) => !isKeyOrRefProps(oneProp));
9+
810
const sortedProps = shouldSortUserProps
911
? [...userPropsOnly.sort()] // We use basic lexical order
1012
: [...userPropsOnly];

0 commit comments

Comments
 (0)