File tree Expand file tree Collapse file tree 3 files changed +5
-14
lines changed Expand file tree Collapse file tree 3 files changed +5
-14
lines changed Original file line number Diff line number Diff line change 3
3
{{ $jsPath := replace $rawJSPath "/static" "" }}
4
4
{{ $dimensionsRef := dict }}
5
5
{{ with resources.Get $jsPath }}
6
- {{ with .Err }}
7
- {{ errorf "%s" . }}
8
- {{ else }}
9
6
{{ $dimensionsRef = . | transform.Unmarshal }}
10
- {{ end }}
11
7
{{ else }}
12
- {{ errorf "Unable to get asset resource %q" $jsPath }}
8
+ {{ errorf "Unable to get asset resource %q" $jsPath }}
13
9
{{ end }}
14
10
15
-
16
11
< div class ="row flex-xl-nowrap ">
17
12
18
13
Original file line number Diff line number Diff line change 1
1
{{ $file := .Get 0 }}
2
2
{{ $params := .Get 1 }}
3
3
{{ $codeBlockId := printf "id-%x" (now.UnixNano) }}
4
- {{ with resources.GetRemote $file }}
4
+ {{ with try ( resources.GetRemote $file) }}
5
5
{{ with .Err }}
6
6
{{ errorf "%s" . }}
7
7
{{ else }}
8
8
{{ $lang := path.Ext $file | strings.TrimPrefix "." }}
9
9
< div id ="code-block-v1 " data-mf ="false ">
10
- {{ highlight .Content $lang $params }}
10
+ {{ highlight .Value $lang $params }}
11
11
</ div >
12
12
13
13
< div class ="code-block " data-mf ="true " style ="display: none; ">
17
17
< div class ="code-container chroma ">
18
18
< button onclick ="copyToClipBoard(this, {{ $codeBlockId }}) " class ="code-copy-button multi-line " type ="button "> Copy</ button >
19
19
< div class ="highlight-v2 " id ="{{ $codeBlockId }} ">
20
- {{ highlight .Content $lang $params }}
20
+ {{ highlight .Value $lang $params }}
21
21
</ div >
22
22
</ div >
23
- </ div >
23
+ </ div >
24
24
{{ end }}
25
25
{{ else }}
26
26
{{ errorf "Unable to load github content from %s from %q" $file .Position}}
Original file line number Diff line number Diff line change 3
3
{{ $jsPath := replace $rawJSPath "/static" "" }}
4
4
{{ $metricsRef := dict }}
5
5
{{ with resources.Get $jsPath }}
6
- {{ with .Err }}
7
- {{ errorf "%s" . }}
8
- {{ else }}
9
6
{{ $metricsRef = . | transform.Unmarshal }}
10
- {{ end }}
11
7
{{ else }}
12
8
{{ errorf "Unable to get asset resource %q" $jsPath }}
13
9
{{ end }}
You can’t perform that action at this time.
0 commit comments