File tree Expand file tree Collapse file tree 2 files changed +27
-18
lines changed Expand file tree Collapse file tree 2 files changed +27
-18
lines changed Original file line number Diff line number Diff line change 1
- {{ $code := .Inner | safeHTML }}
2
- {{ $lines := split $code "\n" }}
3
1
< div data-mf ="true " class ="highlight-mf " style ="display: none ">
2
+ {{- $code := .Inner -}}
3
+ {{- $lines := split $code "\n" -}}
4
4
< pre class ="chroma " tabindex ="0 ">
5
- < code class ="language-{{ .Type }} ">
6
- {{ range $lines }}
7
- < span class ="line "> {{ $line := . }}{{ $parts := split $line "#" }}< span class ="code "> {{ index $parts 0 | safeHTML }}
8
- </ span > {{ $commentPart := "" }}{{ if gt (len $parts) 1 }}< span class ="comment "> {{ index $parts 1 | safeHTML }}</ span > {{ end }}</ span >
9
- {{ end }}
5
+ < code class ="language-{{- .Type -}} ">
6
+ {{- range $lines -}}
7
+ < span class ="line ">
8
+ {{- $line := . -}}
9
+ {{- $parts := split $line "#" -}}
10
+ < span class ="code ">
11
+ {{- index $parts 0 -}}
12
+ </ span >
13
+ {{- $commentPart := "" -}}
14
+ {{- if gt (len $parts) 1 -}}
15
+ < span class ="comment ">
16
+ {{- index $parts 1 -}}
17
+ </ span >
18
+ {{- end -}}
19
+ </ span >
20
+ {{- end -}}
10
21
</ code >
11
22
</ pre >
12
23
</ div >
13
-
14
- {{ $result := transform.HighlightCodeBlock . }}
15
- {{ $result.Wrapped }}
16
-
17
- <!-- ABSOLUTELY DO NOT CHANGE THIS ORDER -->
24
+ {{- $result := transform.HighlightCodeBlock . -}}
25
+ {{- $result.Wrapped -}}
26
+ {{- "" -}}
Original file line number Diff line number Diff line change 1
1
< nav class ="bd-links " aria-label ="Main navigation ">
2
2
< div class ="bd-toc-item active ">
3
3
< h3 class ="bd-toc-link "> What's on This Page</ h3 >
4
- {{ if .Params.catalogType }}
5
- {{ partial "catalog-toc" . }}
6
- {{ else }}
7
- {{ with .TableOfContents }}
8
- {{ . }}
9
- {{ end }}
4
+ {{- if .Params.catalogType - }}
5
+ {{- partial "catalog-toc" . - }}
6
+ {{- else - }}
7
+ {{- with .TableOfContents - }}
8
+ {{- . - }}
9
+ {{- end - }}
10
10
{{ end }}
11
11
</ div >
12
12
</ nav >
You can’t perform that action at this time.
0 commit comments