mirror of
https://github.com/miniflux/v2.git
synced 2025-06-27 16:36:00 +00:00
refactor(processor): improve the rewrite
URL rule regex
- Use `[^"]` instead of `.`, to help the regex engine to determine boundaries, instead of having it bruteforce its way to find them - Use `+` instead of `*`, as empty rules don't make sense
This commit is contained in:
parent
bfb429b919
commit
fefbf2c935
1 changed files with 1 additions and 1 deletions
|
@ -25,7 +25,7 @@ import (
|
||||||
"github.com/tdewolff/minify/v2/html"
|
"github.com/tdewolff/minify/v2/html"
|
||||||
)
|
)
|
||||||
|
|
||||||
var customReplaceRuleRegex = regexp.MustCompile(`rewrite\("(.*)"\|"(.*)"\)`)
|
var customReplaceRuleRegex = regexp.MustCompile(`rewrite\("([^"]+)"\|"([^"]+)"\)`)
|
||||||
|
|
||||||
// ProcessFeedEntries downloads original web page for entries and apply filters.
|
// ProcessFeedEntries downloads original web page for entries and apply filters.
|
||||||
func ProcessFeedEntries(store *storage.Storage, feed *model.Feed, user *model.User, forceRefresh bool) {
|
func ProcessFeedEntries(store *storage.Storage, feed *model.Feed, user *model.User, forceRefresh bool) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue