We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 04c1e60 commit 898d46eCopy full SHA for 898d46e
1 file changed
pr-checks/sync.ts
@@ -109,7 +109,17 @@ function writeYaml(filePath: string, data: any): void {
109
quotingType: "'", // Use single quotes where quoting is needed
110
forceQuotes: false,
111
});
112
- fs.writeFileSync(filePath, header + yamlStr, "utf8");
+ fs.writeFileSync(filePath, stripTrailingWhitespace(header + yamlStr), "utf8");
113
+}
114
+
115
+/**
116
+ * Strip trailing whitespace from each line.
117
+ */
118
+function stripTrailingWhitespace(content: string): string {
119
+ return content
120
+ .split("\n")
121
+ .map((line) => line.trimEnd())
122
+ .join("\n");
123
}
124
125
/**
0 commit comments