Skip to content

Commit

Permalink
fix(homeConfig): make the regex work on more versions
Browse files Browse the repository at this point in the history
  • Loading branch information
rxri committed Feb 5, 2025
1 parent 923669e commit 7a53725
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/apply/apply.go
Original file line number Diff line number Diff line change
Expand Up @@ -361,10 +361,10 @@ func insertHomeConfig(jsPath string, flags Flag) {
return fmt.Sprintf("%sSpicetifyHomeConfig.arrange(%s)%s", submatches[1], submatches[2], submatches[3])
})

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

0 comments on commit 7a53725

Please sign in to comment.