Skip to content

Commit eb56651

Browse files
authored
Fix whitespace handling in features-state.html using Go comment tags (#48331)
- Utilized Go comment tags {{- /* Comment Text here */ -}} to manage whitespace - Improved indentation for better readability - Prevented unwanted line breaks or spaces in the rendered HTML output
1 parent 3d031f1 commit eb56651

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

layouts/shortcodes/feature-state.html

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,18 @@
77
{{ if not $feature_gate_name }}
88
{{ if not $is_valid }}
99
{{ errorf "%q is not a valid feature-state, use one of %q" $state $valid_states }}
10-
{{ else }}
10+
{{- else -}}
11+
{{- /* Display feature state notice */ -}}
1112
<div class="feature-state-notice feature-{{ $state }}">
12-
<span class="feature-state-name">{{ T "feature_state" }}</span>
13+
<span class="feature-state-name">{{ T "feature_state" }}</span>
1314
<code>{{ T "feature_state_kubernetes_label" }} {{ $for_k8s_version }} [{{ $state }}]</code>
1415
</div>
1516
{{ end }}
1617
{{ else }}
1718
<!-- When 'feature_gate_name' is specified, extract status of the feature gate -->
18-
19+
1920
{{- $featureGateDescriptionFilesPath := "/docs/reference/command-line-tools-reference/feature-gates" -}}
20-
21+
2122
{{- with index (where .Site.Sites "Language.Lang" "eq" "en") 0 -}}
2223
{{- with .GetPage $featureGateDescriptionFilesPath -}}
2324

0 commit comments

Comments
 (0)