Skip to content

Commit

Permalink
Fix missing markdown table formatting (#85)
Browse files Browse the repository at this point in the history
This updates the enum table in the `type.tpl` template to include missing
table header, ensuring it renders correctly as a markdown table.

---------
Co-authored-by: Thibault Richard <thb.krkr@gmail.com>
  • Loading branch information
gcs278 committed Jul 25, 2024
1 parent 9e0eec8 commit 282ebc8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions templates/markdown/type.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ _Appears in:_

{{ if $type.EnumValues -}}
| Field | Description |
| --- | --- |
{{ range $type.EnumValues -}}
| `{{ .Name }}` | {{ markdownRenderFieldDoc .Doc }} |
{{ end -}}
Expand Down
1 change: 1 addition & 0 deletions test/expected.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ _Appears in:_
- [GuestbookSpec](#guestbookspec)

| Field | Description |
| --- | --- |
| `MyFirstValue` | MyFirstValue is an interesting value to use<br /> |
| `MySecondValue` | MySecondValue is what you use when you can't use MyFirstValue<br /> |

Expand Down

0 comments on commit 282ebc8

Please sign in to comment.