This commit is contained in:
Nazar Kanaev 2023-02-02 22:06:27 +00:00
parent 012b58bbe4
commit 632412c10e
16 changed files with 61 additions and 51 deletions

View File

@ -1,3 +1,4 @@
//go:build release
// +build release // +build release
package assets package assets

View File

@ -364,7 +364,6 @@ func isBlockedTag(tagName string) bool {
} }
/* /*
One or more strings separated by commas, indicating possible image sources for the user agent to use. One or more strings separated by commas, indicating possible image sources for the user agent to use.
Each string is composed of: Each string is composed of:
@ -372,7 +371,6 @@ Each string is composed of:
- Optionally, whitespace followed by one of: - Optionally, whitespace followed by one of:
- A width descriptor (a positive integer directly followed by w). The width descriptor is divided by the source size given in the sizes attribute to calculate the effective pixel density. - A width descriptor (a positive integer directly followed by w). The width descriptor is divided by the source size given in the sizes attribute to calculate the effective pixel density.
- A pixel density descriptor (a positive floating point number directly followed by x). - A pixel density descriptor (a positive floating point number directly followed by x).
*/ */
func sanitizeSrcsetAttr(baseURL, value string) string { func sanitizeSrcsetAttr(baseURL, value string) string {
var sanitizedSources []string var sanitizedSources []string

View File

@ -1,3 +1,4 @@
//go:build !windows
// +build !windows // +build !windows
package platform package platform

View File

@ -58,12 +58,15 @@ var oldStdin, oldStdout, oldStderr *os.File
// //
// Net result is as follows. // Net result is as follows.
// Before: // Before:
//
// SHELL NON-REDIRECTED REDIRECTED // SHELL NON-REDIRECTED REDIRECTED
// explorer.exe no console n/a // explorer.exe no console n/a
// cmd.exe broken works // cmd.exe broken works
// powershell broken broken // powershell broken broken
// WSL bash broken works // WSL bash broken works
//
// After // After
//
// SHELL NON-REDIRECTED REDIRECTED // SHELL NON-REDIRECTED REDIRECTED
// explorer.exe no console n/a // explorer.exe no console n/a
// cmd.exe works works // cmd.exe works works

View File

@ -1,3 +1,4 @@
//go:build macos || windows
// +build macos windows // +build macos windows
package platform package platform

View File

@ -1,3 +1,4 @@
//go:build !windows && !macos
// +build !windows,!macos // +build !windows,!macos
package platform package platform

View File

@ -1,3 +1,4 @@
//go:build macos
// +build macos // +build macos
package platform package platform

View File

@ -1,3 +1,4 @@
//go:build windows
// +build windows // +build windows
package platform package platform

View File

@ -1,3 +1,4 @@
//go:build !windows && !darwin
// +build !windows,!darwin // +build !windows,!darwin
package platform package platform

View File

@ -1,3 +1,4 @@
//go:build darwin
// +build darwin // +build darwin
package platform package platform

View File

@ -1,3 +1,4 @@
//go:build windows
// +build windows // +build windows
package platform package platform

View File

@ -300,11 +300,11 @@ var (
// Delete old articles from the database to cleanup space. // Delete old articles from the database to cleanup space.
// //
// The rules: // The rules:
// * Never delete starred entries. // - Never delete starred entries.
// * Keep at least the same amount of articles the feed provides (default: 50). // - Keep at least the same amount of articles the feed provides (default: 50).
// This prevents from deleting items for rarely updated and/or ever-growing // This prevents from deleting items for rarely updated and/or ever-growing
// feeds which might eventually reappear as unread. // feeds which might eventually reappear as unread.
// * Keep entries for a certain period (default: 90 days). // - Keep entries for a certain period (default: 90 days).
func (s *Storage) DeleteOldItems() { func (s *Storage) DeleteOldItems() {
rows, err := s.db.Query(` rows, err := s.db.Query(`
select select