for _, topic := range parseTopics(getNote(topicsTree, commit.Hash)) {
categories = append(categories, atom.Category{Term: topic})
}
+ htmlized := make([]string, 0, len(lines))
+ htmlized = append(htmlized, "<pre>")
+ for _, l := range lines[2:] {
+ htmlized = append(htmlized, html.EscapeString(l))
+ }
+ htmlized = append(htmlized, "</pre>")
feed.Entry = append(feed.Entry, &atom.Entry{
Title: lines[0],
ID: "urn:uuid:" + bytes2uuid(commit.Hash[:]),
Updated: atom.Time(commit.Author.When),
Summary: &atom.Text{Type: "text", Body: lines[0]},
Content: &atom.Text{
- Type: "text",
- Body: strings.Join(lines[2:], "\n"),
+ Type: "html",
+ Body: strings.Join(htmlized, "\n"),
},
Category: categories,
})