Skip to content

Commit 7a6e7a5

Browse files
committed
fix: indentation of feature types generate command
1 parent 2c265e6 commit 7a6e7a5

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

packages/cli/utils/gen.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,16 @@ export const KeyFormatPatterns: Record<KeyFormat, KeyFormatPattern> = {
6868
},
6969
};
7070

71-
export function indentLines(str: string, indent = 2, lineBreak = "\n"): string {
71+
export function indentLines(
72+
str: string,
73+
indent = 2,
74+
lineBreak = "\n",
75+
trim = false,
76+
): string {
7277
const indentStr = " ".repeat(indent);
7378
return str
7479
.split(lineBreak)
75-
.map((line) => `${indentStr}${line.trim()}`)
80+
.map((line) => `${indentStr}${trim ? line.trim() : line}`)
7681
.join(lineBreak);
7782
}
7883

0 commit comments

Comments
 (0)