Browse Source

admin: Fix regex for removing @id fields (closes #3187)

master
Matthew Holt 5 years ago
parent
commit
95b2863df2
No known key found for this signature in database GPG Key ID: 2A349DD577D586A5
  1. 2
      admin.go

2
admin.go

@ -776,7 +776,7 @@ var (
// in the config. It also matches adjacent commas so that syntax
// can be preserved no matter where in the object the field appears.
// It supports string and most numeric values.
var idRegexp = regexp.MustCompile(`(?m),?\s*"` + idKey + `":\s?(-?[0-9]+(\.[0-9]+)?|(?U)".*")\s*,?`)
var idRegexp = regexp.MustCompile(`(?m),?\s*"` + idKey + `"\s*:\s*(-?[0-9]+(\.[0-9]+)?|(?U)".*")\s*,?`)
const (
rawConfigKey = "config"

Loading…
Cancel
Save