Skip to content

Commit

Permalink
Merge pull request #2 from donseba/css
Browse files Browse the repository at this point in the history
fix importmap render
  • Loading branch information
donseba authored Mar 25, 2024
2 parents f1b654b + 743d2a3 commit 47affc1
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion importmap.go
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,14 @@ func (im *ImportMap) Render() (template.HTML, error) {
if len(im.Structure.Imports) > 0 {
out += `<script type="importmap">
`
b, err := json.MarshalIndent(im.Structure.Imports, "", " ")

data := struct {
Imports map[string]string `json:"imports"`
}{
Imports: im.Structure.Imports,
}

b, err := json.MarshalIndent(data, "", " ")
if err != nil {
return "", err
}
Expand Down

0 comments on commit 47affc1

Please sign in to comment.