1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-08-01 17:38:37 +00:00
miniflux-v2/internal/reader/sanitizer
jvoisin cdb57b3843 perf(sanitizer): minor simplifications of the sanitizer
- Factorize some conditions
- Remove useless `default` case and move the return at the end of the functions
- Use strings.CutPrefix instead of strings.HasPrefix + strings.TrimPrefix
- Use switch-case constructs instead of slices.Contains, as this reduces the
  complexity of the functions and allows them to be inlined, as well as helping
  the compiler to optimize them, as it sucks at interprocedural optimizations.
2025-06-17 17:42:45 -07:00
..
testdata Speed the sanitizer up a bit, again 2024-03-05 19:31:50 -08:00
sanitizer.go perf(sanitizer): minor simplifications of the sanitizer 2025-06-17 17:42:45 -07:00
sanitizer_test.go refactor(sanitizer): use global variables to avoid recreating slices on every call 2025-06-13 21:34:07 -07:00
srcset.go fix: address minor issues detected by Go linters 2025-03-24 20:48:46 -07:00
srcset_test.go Move internal packages to an internal folder 2023-08-10 20:29:34 -07:00
strip_tags.go refactor(sanitizer): optimize internal/reader/sanitizer/strip_tags.go 2024-12-07 16:31:48 -08:00
strip_tags_test.go Move internal packages to an internal folder 2023-08-10 20:29:34 -07:00
truncate.go perf(sanitizer): remove two useless calls to strings.ReplaceAll 2025-02-18 19:42:39 -08:00
truncate_test.go feat(sanitizer): improve text truncation with better space handling 2025-02-06 21:21:49 -08:00