Skip to content

Commit

Permalink
Update anchor tags for inputs and outputs in Terraform docs
Browse files Browse the repository at this point in the history
  • Loading branch information
milldr committed Aug 1, 2024
1 parent 0d7e545 commit 2e77ef1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/docs-collator/templates/modules/terraform-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ content: |-
<dl>
{{- range .Module.Inputs }}
{{- if and (not (has .Name $context_variables)) .Required }}
<dt>`{{ .Name }}`{{ if lt (len (split "\n" (tostring .Type))) 2 }} (`{{ tostring .Type }}`){{end}} <i>required</i>{{ if contains "OBSOLETE: " (tostring .Description) }} <strong>OBSOLETE</strong>{{ end }}</dt>
<dt><a id="{{ .Name }}" href="#{{ .Name }}">`{{ .Name }}`</a>{{ if lt (len (split "\n" (tostring .Type))) 2 }} (`{{ tostring .Type }}`){{end}} <i>required</i>{{ if contains "OBSOLETE: " (tostring .Description) }} <strong>OBSOLETE</strong>{{ end }}</dt>
<dd>
{{- $lines := regexSplit "\n" (tostring .Description | replace "OBSOLETE: " "") -1 -}}
{{- range $lines }}
Expand Down Expand Up @@ -143,7 +143,7 @@ content: |-
<dl>
{{- range .Module.Inputs }}
{{- if and (has .Name $context_variables) }}
<dt>`{{ .Name }}`{{ if lt (len (split "\n" (tostring .Type))) 2 }} (`{{ tostring .Type }}`){{end}} <i>{{ ternary .Required "required" "optional" }}</i>{{ if contains "OBSOLETE: " (tostring .Description) }} <strong>OBSOLETE</strong>{{ end }}</dt>
<dt><a id="{{ .Name }}" href="#{{ .Name }}">`{{ .Name }}`</a>{{ if lt (len (split "\n" (tostring .Type))) 2 }} (`{{ tostring .Type }}`){{end}} <i>{{ ternary .Required "required" "optional" }}</i>{{ if contains "OBSOLETE: " (tostring .Description) }} <strong>OBSOLETE</strong>{{ end }}</dt>
<dd>
{{- $lines := regexSplit "\n" (tostring .Description | replace "OBSOLETE: " "") -1 -}}
{{- range $lines }}
Expand Down Expand Up @@ -176,7 +176,7 @@ content: |-
<dl>
{{- range .Module.Outputs }}
<dt>`{{ .Name }}`{{ if contains "OBSOLETE: " (tostring .Description) }} <strong>OBSOLETE</strong>{{ end }}</dt>
<dt><a id="{{ .Name }}" href="#{{ .Name }}">`{{ .Name }}`</a>{{ if contains "OBSOLETE: " (tostring .Description) }} <strong>OBSOLETE</strong>{{ end }}</dt>
<dd>
{{- $lines := regexSplit "\n" (tostring .Description | replace "OBSOLETE: " "" | default "n/a" ) -1 -}}
{{- range $lines }}
Expand Down

0 comments on commit 2e77ef1

Please sign in to comment.