{{/* The review-thread markup, defined once and parsed into every page set. The diff renderer (web/diff.go) executes "blockthreads" into the HTML it builds for one block, and the proposal page renders "thread" directly for the comments whose anchor no longer names a block. Both go through html/template rather than string building because a comment body is prose someone else wrote: contextual auto-escaping is what keeps it text. */}} {{define "thread"}}
{{.Author}} {{if .Agent}}agent{{end}} {{.When}} {{if .Resolved}}resolved{{end}} {{if .Note}}{{.Note}}{{end}} {{if .DocPath}}{{.DocPath}}{{end}}
{{.Body}}
{{range .Replies}}
{{.Author}} {{if .Agent}}agent{{end}} {{.When}}
{{.Body}}
{{end}}
{{if .CanReply}}
Reply
{{end}} {{if .CanResolve}}
{{end}}
{{end}} {{define "blockthreads"}} {{if .Threads}}
{{range .Threads}}{{template "thread" .}}{{end}}
{{end}} {{if .Compose}}
Comment on this block
{{end}} {{end}}