Skip to content

Commit 432d4f4

Browse files
authored
Fix JSON parsing (#413)
1 parent 0ff34b6 commit 432d4f4

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Diff for: preprocessors/jsonassets/jsonassets.go

+8-8
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,14 @@ func Preprocessor(runtime preprocessors.Runtime) error {
5151
for t, htmlAssets := range types {
5252
for _, ha := range htmlAssets {
5353
attrs := []html.Attribute{}
54-
for _, a := range ha.attributes {
54+
for _, a := range ha.Attributes {
5555
attrs = append(attrs, html.Attribute{
56-
Key: a.key,
57-
Val: a.value,
56+
Key: a.Key,
57+
Val: a.Value,
5858
})
5959
}
6060
runtime.Assets.AddRemote(
61-
assetmanager.NewRemoteAsset(a.ID(), ha.src, attrs, t),
61+
assetmanager.NewRemoteAsset(a.ID(), ha.Src, attrs, t),
6262
)
6363
}
6464
}
@@ -92,11 +92,11 @@ type jsonAssetGroup struct {
9292
}
9393

9494
type htmlAsset struct {
95-
src string `json:"src"`
96-
attributes []htmlAttribute `json:"attributes,omitempty"`
95+
Src string `json:"src"`
96+
Attributes []htmlAttribute `json:"attributes,omitempty"`
9797
}
9898

9999
type htmlAttribute struct {
100-
key string
101-
value string
100+
Key string
101+
Value string
102102
}

0 commit comments

Comments
 (0)