struct TagList: HtmlProducer {

    let tags: [FeedEntryData.Tag]

    func populate(_ result: inout String) {
        guard !tags.isEmpty else {
            return
        }
        result += "<div class='tags'>"
        for tag in tags {
            result += "<span class='tag' onclick=\"location.href='\(tag.url)'; event.stopPropagation();\">\(tag.name)</span>"
        }
        result += "</div>"
    }
}
