From e5449ca686797c7c31f5fcb34148663a38649156 Mon Sep 17 00:00:00 2001 From: Delusoire Date: Fri, 9 Feb 2024 19:06:07 +0100 Subject: [PATCH] fix(wrapper): fix ContextMenu regex for v1.2.13 (#2810) --- src/preprocess/preprocess.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/preprocess/preprocess.go b/src/preprocess/preprocess.go index 4bbdc8a270..b05b77626a 100644 --- a/src/preprocess/preprocess.go +++ b/src/preprocess/preprocess.go @@ -372,7 +372,7 @@ func exposeAPIs_main(input string) string { trigger := utils.FindLastMatch(croppedInput, `trigger:([\w_$]+)`)[1] target := utils.FindLastMatch(croppedInput, `triggerRef:([\w_$]+)`)[1] - utils.Replace(&input, `\(0,([\w_$]+)\.jsx\)\([\w_$]+\.[\w_$]+,\{value:"contextmenu"[^\}]+\}\)\}\)`, `${1}.jsx((Spicetify.ContextMenuV2._context||(Spicetify.ContextMenuV2._context=`+react+`.createContext(null))).Provider,{value:{props:`+menu+`?.props,trigger:`+trigger+`,target:`+target+`},children:${0}})`) + utils.Replace(&input, `\(0,([\w_$]+)\.jsx\)\([\w_$]+\.[\w_$]+,\{value:"contextmenu"[^\}]+\}\)\}\)`, `(0,${1}.jsx)((Spicetify.ContextMenuV2._context||(Spicetify.ContextMenuV2._context=`+react+`.createContext(null))).Provider,{value:{props:`+menu+`?.props,trigger:`+trigger+`,target:`+target+`},children:${0}})`) return input }