Unverified Commit 29674b84 authored by XhmikosR's avatar XhmikosR Committed by GitHub
Browse files

Simplify bugify.html (#33063)

* use `in` instead of `strings.Contains` since the latter is not documented
* use `cond`
3 merge requests!36532My v4 dev,!34086v4: Fix prevented show event disables modals with fade class from being displayed again,!33729V4 dev
Showing with 4 additions and 8 deletions
+4 -8
{{- $words := (split . " ") -}}
{{- $words := split . " " -}}
{{- range $word := $words -}}
{{- if (strings.Contains $word "#") -}}
{{- $separator := false -}}
{{- if (strings.Contains $word ",") -}}
{{- $separator = true -}}
{{- end -}}
{{- if (in $word "#") -}}
{{- $has_separator := cond (in $word ",") true false -}}
{{- $data := split $word "#" -}}
{{- $bug_cat := replace (index $data 0) "\n" "" -}}
......@@ -32,7 +28,7 @@
{{- else if (eq $bug_cat "Normalize") -}}
<a href="https://github.com/necolas/normalize.css/issues/{{ $bug_id }}">Normalize #{{ $bug_id }}</a>
{{- end -}}
{{- if (eq $separator true) }}, {{ end -}}
{{- if $has_separator }}, {{ end -}}
{{- else -}}
{{- $word -}}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment