Tidy stale comments and duplicated helpers
Comments carried over from web_server (CVLayout.vue, messageResolver, the Spotify token code) and ones outdated by later changes (the email window now anchors on ReceivedAt, failed emails are retried) are corrected. truncateRunes had a copy in handlers and in services; there is now one, services.TruncateRunes. cleanEmailBody's regexes are compiled once, a status check that could never fire is gone, and api.js loses its unused put/patch helpers. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -491,9 +491,9 @@ func htmlToText(content string) string {
|
||||
return strings.TrimSpace(strings.Join(lines, "\n"))
|
||||
}
|
||||
|
||||
// truncateRunes cuts s to at most max runes, on a rune boundary so the result
|
||||
// TruncateRunes cuts s to at most max runes, on a rune boundary so the result
|
||||
// is still valid UTF-8 for Postgres and for JSON.
|
||||
func truncateRunes(s string, max int) string {
|
||||
func TruncateRunes(s string, max int) string {
|
||||
runes := []rune(s)
|
||||
if len(runes) <= max {
|
||||
return s
|
||||
|
||||
Reference in New Issue
Block a user