Skip to content

Commit

Permalink
Fix JSON parsing (#413)
Browse files Browse the repository at this point in the history
  • Loading branch information
gauntface authored Jun 18, 2023
1 parent 0ff34b6 commit 432d4f4
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions preprocessors/jsonassets/jsonassets.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ func Preprocessor(runtime preprocessors.Runtime) error {
for t, htmlAssets := range types {
for _, ha := range htmlAssets {
attrs := []html.Attribute{}
for _, a := range ha.attributes {
for _, a := range ha.Attributes {
attrs = append(attrs, html.Attribute{
Key: a.key,
Val: a.value,
Key: a.Key,
Val: a.Value,
})
}
runtime.Assets.AddRemote(
assetmanager.NewRemoteAsset(a.ID(), ha.src, attrs, t),
assetmanager.NewRemoteAsset(a.ID(), ha.Src, attrs, t),
)
}
}
Expand Down Expand Up @@ -92,11 +92,11 @@ type jsonAssetGroup struct {
}

type htmlAsset struct {
src string `json:"src"`
attributes []htmlAttribute `json:"attributes,omitempty"`
Src string `json:"src"`
Attributes []htmlAttribute `json:"attributes,omitempty"`
}

type htmlAttribute struct {
key string
value string
Key string
Value string
}

0 comments on commit 432d4f4

Please sign in to comment.