Skip to content

Commit

Permalink
fixup! WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
ezzatron committed Mar 30, 2024
1 parent ce3e1f5 commit b8baab9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/specification.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export async function render(variables: Variable<unknown>[]): Promise<string> {
emphasis: "_",
extensions: [gfmToMarkdown()],
},
).trimEnd(),
),
);
}

Expand All @@ -49,7 +49,7 @@ async function prettyPrint(markdown: string): Promise<string> {
await prettier.format(markdown, { ...options, parser: "markdown" })
).trimEnd();
} catch {
return markdown;
return markdown.trimEnd();
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<BEGIN>
# Environment variables

The `<app>` app uses **declarative environment variables** powered by **[Austenite]**.
Expand Down Expand Up @@ -30,3 +31,5 @@ export LOGO=https://host.example.org/path/to/resource # URL (absolute)
```sh
export LOGO=path/to/resource # URL (relative)
```

<END>
6 changes: 3 additions & 3 deletions test/suite/specification-prettier.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ describe("Specification documents (Prettier unavailable)", () => {
});
await initialize();

await expect(mockConsole.readStdout()).toMatchFileSnapshot(
fixturePath("no-prettier/prettier-unavailable"),
);
await expect(
"<BEGIN>\n" + mockConsole.readStdout() + "\n<END>\n",
).toMatchFileSnapshot(fixturePath("no-prettier/prettier-unavailable"));
expect(exitCode).toBe(0);
});
});
Expand Down

0 comments on commit b8baab9

Please sign in to comment.