MCPcopy
hub / github.com/spicetify/cli / applyPatches

Function applyPatches

src/preprocess/preprocess.go:41–50  ·  view source on GitHub ↗
(input string, patches []Patch)

Source from the content-addressed store, hash-verified

39}
40
41func applyPatches(input string, patches []Patch) string {
42 for _, patch := range patches {
43 if patch.Once {
44 utils.ReplaceOnce(&input, patch.Regex, patch.Replacement)
45 } else {
46 utils.Replace(&input, patch.Regex, patch.Replacement)
47 }
48 }
49 return input
50}
51
52func readRemoteCssMap(tag string, cssTranslationMap *map[string]string) error {
53 var cssMapURL string = "https://raw.githubusercontent.com/spicetify/cli/" + tag + "/css-map.json"

Callers 7

colorVariableReplaceFunction · 0.85
disableLoggingFunction · 0.85
removeRTLFunction · 0.85
additionalPatchesFunction · 0.85
exposeAPIs_mainFunction · 0.85
exposeAPIs_vendorFunction · 0.85

Calls 2

ReplaceOnceFunction · 0.92
ReplaceFunction · 0.92

Tested by

no test coverage detected