Skip to content

Commit 7a53725

Browse files
committed
fix(homeConfig): make the regex work on more versions
1 parent 923669e commit 7a53725

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/apply/apply.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,10 +361,10 @@ func insertHomeConfig(jsPath string, flags Flag) {
361361
return fmt.Sprintf("%sSpicetifyHomeConfig.arrange(%s)%s", submatches[1], submatches[2], submatches[3])
362362
})
363363

364-
// >= 1.2.45
364+
// >= 1.2.40
365365
utils.ReplaceOnce(
366366
&content,
367-
`(&&"HomeShortsSectionData".*\],)([a-zA-Z])(\}\)\()`,
367+
`(&&"HomeShortsSectionData".*?[\],}])([a-zA-Z])(\}\)?\()`,
368368
func(submatches ...string) string {
369369
return fmt.Sprintf("%sSpicetifyHomeConfig.arrange(%s)%s", submatches[1], submatches[2], submatches[3])
370370
})

0 commit comments

Comments
 (0)