Skip to content

Commit

Permalink
pretty
Browse files Browse the repository at this point in the history
  • Loading branch information
tenminus11 committed May 24, 2024
1 parent 8ee5b13 commit 8ef3389
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/cdktf/lib/hcl/render.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function renderString(str: string): string {
const lines = str.split(/\r\n|[\n\r]/);

if (lines.length === 1) return `"${escapeQuotes(str)}"`;

if (!str) return `""`;

return `<<EOF\n${lines.map((s) => escapeQuotes(s)).join("\n")}\nEOF`;
Expand Down Expand Up @@ -522,7 +522,10 @@ function renderFuzzyJsonExpression(jsonExpression: any): string {
if (typeof jsonExpression === "object") {
return renderFuzzyJsonObject(jsonExpression);
}
if (typeof jsonExpression === "boolean" || typeof jsonExpression === "number") {
if (
typeof jsonExpression === "boolean" ||
typeof jsonExpression === "number"
) {
return `${jsonExpression}`;
}

Expand Down

0 comments on commit 8ef3389

Please sign in to comment.