Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add backticks around stack IDs for markdown summary #31

Merged
merged 1 commit into from
Nov 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion internal/formatter.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func printImplementation(writer io.Writer, config cargo.Config) {

fmt.Fprintf(writer, "#### Supported Stacks:\n")
for _, s := range config.Stacks {
fmt.Fprintf(writer, "- %s\n", s.ID)
fmt.Fprintf(writer, "- `%s`\n", s.ID)
}
fmt.Fprintln(writer)
}
Expand Down
24 changes: 9 additions & 15 deletions internal/formatter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,11 @@ func testFormatter(t *testing.T, context spec.G, it spec.S) {

"\n\n**ID:** `some-buildpack`\n\n" +

"**Digest:** `sha256:some-buildpack-sha`" +

"**Digest:** `sha256:some-buildpack-sha`\n\n" +
"#### Supported Stacks:\n" +
"- `other-stack`\n" +
"- `some-stack`\n" +
`

#### Supported Stacks:
- other-stack
- some-stack

#### Default Dependency Versions:
| ID | Version |
|---|---|
Expand Down Expand Up @@ -126,15 +123,12 @@ func testFormatter(t *testing.T, context spec.G, it spec.S) {

"\n\n**ID:** `some-buildpack`\n\n" +

"**Digest:** `sha256:some-buildpack-sha`" +

`

#### Supported Stacks:
- other-stack
- some-stack
"**Digest:** `sha256:some-buildpack-sha`\n\n" +

`))
"#### Supported Stacks:\n" +
"- `other-stack`\n" +
"- `some-stack`\n\n",
))
})
})

Expand Down
17 changes: 8 additions & 9 deletions summarize_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -274,10 +274,10 @@ version = "3.4.5"

"\n\n**ID:** `some-buildpack`\n\n" +

`#### Supported Stacks:
- other-stack
- some-stack

"#### Supported Stacks:\n" +
"- `other-stack`\n" +
"- `some-stack`\n" +
`
#### Default Dependency Versions:
| ID | Version |
|---|---|
Expand All @@ -298,11 +298,10 @@ version = "3.4.5"
<summary>Other Buildpack 2.3.4</summary>` +

"\n\n**ID:** `other-buildpack`\n\n" +

`#### Supported Stacks:
- first-stack
- second-stack

"#### Supported Stacks:\n" +
"- `first-stack`\n" +
"- `second-stack`\n" +
`
#### Default Dependency Versions:
| ID | Version |
|---|---|
Expand Down