fix
This commit is contained in:
1 parent
e81b8c2fcd
commit
0052822e49
7 files changed
+94
-1
No files matched your search
@@ -312,7 +312,23 @@ func (a Alert) HTML(baseURL string, max int) string {
|
||||
fmt.Fprintf(&s, "🔗 <a href=\"%s\">Open issue</a>\n", esc(base+"/issues/"+url.PathEscape(p.IssueID)))
|
||||
}
|
||||
if plainLen(b.String())+plainLen(s.String())+plainLen(foot)+40 > max {
|
||||
fmt.Fprintf(&b, "\n… and %d more pattern%s, see the issues list", len(a.Patterns)-i, plural(len(a.Patterns)-i))
|
||||
remaining := len(a.Patterns) - i
|
||||
b.WriteString("\n<b>Other detected patterns</b>\n")
|
||||
for _, other := range a.Patterns[i:] {
|
||||
var compact strings.Builder
|
||||
fmt.Fprintf(&compact, "· <code>%s</code> — %d now, normally %.0f", esc(other.What), other.Count, other.Baseline)
|
||||
if base != "" && other.IssueID != "" {
|
||||
fmt.Fprintf(&compact, " · <a href=\"%s\">open issue</a>", esc(base+"/issues/"+url.PathEscape(other.IssueID)))
|
||||
}
|
||||
compact.WriteByte('\n')
|
||||
if plainLen(b.String())+plainLen(compact.String())+plainLen(foot)+10 > max {
|
||||
break
|
||||
}
|
||||
b.WriteString(compact.String())
|
||||
}
|
||||
if remaining > 0 && !strings.Contains(b.String(), "open issue") && base != "" {
|
||||
fmt.Fprintf(&b, "(%d additional pattern%s; open Issues for the full list)", remaining, plural(remaining))
|
||||
}
|
||||
break
|
||||
}
|
||||
b.WriteString(s.String())
|
||||
|
||||
Reference in new issue
Block a user