Skip to content
Open
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
11 changes: 6 additions & 5 deletions layouts/shortcodes/feature-gate-list.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<!-- Sort Feature gate pages list -->
{{- $sortedFeatureGates := sort ($featureDataFiles.Resources.ByType "page") -}}

<ul class="feature-gate-list">
<dl class="feature-gate-list">
{{- range $featureGateFile := $sortedFeatureGates -}}

<!-- Extract the feature gate name from the "Title" parameter in file -->
Expand Down Expand Up @@ -48,13 +48,14 @@

{{- if $shouldDisplayThisFeatureGate -}}
{{- with $featureGateFile.Content -}}
<li>
<dt id="{{ $featureGateName }}"><code class="feature-gate-name">{{ $featureGateName }}</code></dt>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might:

Suggested change
<dt id="{{ $featureGateName }}"><code class="feature-gate-name">{{ $featureGateName }}</code></dt>
<dt id="feature-{{ $featureGateName }}"><code class="feature-gate-name">{{ $featureGateName }}</code></dt>

to avoid the risk of a collision with some other site feature. However, don't let this block a merge.

<dd>
{{- $hasParagraphWrapper := (hasPrefix ( . | markdownify ) "<p>") -}}
{{- if not $hasParagraphWrapper }}<p>{{ end -}}
<code class="feature-gate-name">{{ $featureGateName }}</code>: {{ . | markdownify -}}
{{ . | markdownify -}}
{{- if not $hasParagraphWrapper }}</p>{{ end -}}
</li>
</dd>
{{- end -}}
{{- end -}}
{{- end -}}
</ul>
</dl>