func Rewriter(entryURL, entryContent, customRewriteRules string) string {
	rulesList := getPredefinedRewriteRules(entryURL)
	if customRewriteRules != "" {
		rulesList = customRewriteRules
	}
	rules := parseRules(rulesList)
	rules = append(rules, rule{name: "add_pdf_download_link"})
	logger.Debug(`[Rewrite] Applying rules %v for %q`, rules, entryURL)
	for _, rule := range rules {
		entryContent = applyRule(entryURL, entryContent, rule)
	}
	return entryContent
}
Rewriter modify item contents with a set of rewriting rules.
package rewrite  
import (
	"strconv"
	"strings"
	"text/scanner"
	"miniflux.app/logger"
	"miniflux.app/url"
)
type rule struct {
	name string
	args []string
}