fix json empty tags indentation.

This commit is contained in:
fiatjaf
2023-10-25 11:13:01 -03:00
parent 66c4a0832b
commit 015b6b1c42

View File

@@ -504,14 +504,18 @@ func eventToHTML(evt *nostr.Event) template.HTML {
tagsHTML += "\n <span class=" + cls + ">" + html.EscapeString(string(itemJSON))
if i < len(tag)-1 {
tagsHTML += ","
} else {
tagsHTML += "\n "
}
}
tagsHTML += "\n ]"
tagsHTML += "]"
if t < len(evt.Tags)-1 {
tagsHTML += ","
} else {
tagsHTML += "\n "
}
}
tagsHTML += "\n ]"
tagsHTML += "]"
contentJSON, _ := json.Marshal(evt.Content)