From 282ebc85bd0afd86b2ff6982b3eed984a141255e Mon Sep 17 00:00:00 2001 From: Grant Spence Date: Thu, 25 Jul 2024 05:14:09 -0400 Subject: [PATCH] Fix missing markdown table formatting (#85) 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 --- templates/markdown/type.tpl | 1 + test/expected.md | 1 + 2 files changed, 2 insertions(+) diff --git a/templates/markdown/type.tpl b/templates/markdown/type.tpl index 2d51ca5..7d89d04 100644 --- a/templates/markdown/type.tpl +++ b/templates/markdown/type.tpl @@ -38,6 +38,7 @@ _Appears in:_ {{ if $type.EnumValues -}} | Field | Description | +| --- | --- | {{ range $type.EnumValues -}} | `{{ .Name }}` | {{ markdownRenderFieldDoc .Doc }} | {{ end -}} diff --git a/test/expected.md b/test/expected.md index 730ae66..f1a7c25 100644 --- a/test/expected.md +++ b/test/expected.md @@ -201,6 +201,7 @@ _Appears in:_ - [GuestbookSpec](#guestbookspec) | Field | Description | +| --- | --- | | `MyFirstValue` | MyFirstValue is an interesting value to use
| | `MySecondValue` | MySecondValue is what you use when you can't use MyFirstValue
|