File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -233,8 +233,8 @@ export async function push(
233233 `scripts/${ scriptName } .js`
234234 ) ,
235235 minifiedCode
236- . replace ( new RegExp ( `$${ uniqueID } $SCRIPT_USER$` , `g` ) , user )
237- . replace ( new RegExp ( `$${ uniqueID } $FULL_SCRIPT_NAME$` , `g` ) , `${ user } .${ scriptName } ` )
236+ . replace ( new RegExp ( `\\ $${ uniqueID } \\ $SCRIPT_USER\\ $` , `g` ) , user )
237+ . replace ( new RegExp ( `\\ $${ uniqueID } \\ $FULL_SCRIPT_NAME\\ $` , `g` ) , `${ user } .${ scriptName } ` )
238238 )
239239 ) )
240240
@@ -286,8 +286,8 @@ export async function push(
286286 `scripts/${ scriptName } .js`
287287 ) ,
288288 minifiedCode
289- . replace ( new RegExp ( `$${ uniqueID } $SCRIPT_USER$` , `g` ) , user )
290- . replace ( new RegExp ( `$${ uniqueID } $FULL_SCRIPT_NAME$` , `g` ) , `${ user } .${ scriptName } ` )
289+ . replace ( new RegExp ( `\\ $${ uniqueID } \\ $SCRIPT_USER\\ $` , `g` ) , user )
290+ . replace ( new RegExp ( `\\ $${ uniqueID } \\ $FULL_SCRIPT_NAME\\ $` , `g` ) , `${ user } .${ scriptName } ` )
291291 )
292292 ) )
293293
Original file line number Diff line number Diff line change @@ -165,8 +165,8 @@ export function watch(
165165 await Promise . all ( usersToPushTo . map ( user => writeFilePersistent (
166166 resolvePath ( hackmudDirectory , user , `scripts/${ scriptName } .js` ) ,
167167 minifiedCode
168- . replace ( new RegExp ( `$${ uniqueID } $SCRIPT_USER$` , `g` ) , user )
169- . replace ( new RegExp ( `$${ uniqueID } $FULL_SCRIPT_NAME$` , `g` ) , `${ user } .${ scriptName } ` )
168+ . replace ( new RegExp ( `\\ $${ uniqueID } \\ $SCRIPT_USER\\ $` , `g` ) , user )
169+ . replace ( new RegExp ( `\\ $${ uniqueID } \\ $FULL_SCRIPT_NAME\\ $` , `g` ) , `${ user } .${ scriptName } ` )
170170 ) ) )
171171
172172 onPush ?.( {
You can’t perform that action at this time.
0 commit comments