mirror of
https://github.com/caddyserver/caddy.git
synced 2024-12-27 06:03:48 +03:00
admin: Fix regex for removing @id fields (closes #3187)
This commit is contained in:
parent
341d4fb805
commit
95b2863df2
1 changed files with 1 additions and 1 deletions
2
admin.go
2
admin.go
|
@ -776,7 +776,7 @@ var (
|
||||||
// in the config. It also matches adjacent commas so that syntax
|
// in the config. It also matches adjacent commas so that syntax
|
||||||
// can be preserved no matter where in the object the field appears.
|
// can be preserved no matter where in the object the field appears.
|
||||||
// It supports string and most numeric values.
|
// 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 (
|
const (
|
||||||
rawConfigKey = "config"
|
rawConfigKey = "config"
|
||||||
|
|
Loading…
Reference in a new issue