enhance: skip the directives validation check of gonginx

This commit is contained in:
0xJacky 2024-01-16 22:55:10 +08:00
parent 99d6983924
commit 1658e4b5a3
No known key found for this signature in database
GPG key ID: B6E4A6E4A561BAF0
6 changed files with 8 additions and 8 deletions

View file

@ -11,7 +11,7 @@ func (c *NgxConfig) FmtCode() (fmtContent string) {
}
func FmtCode(content string) (fmtContent string, err error) {
p := parser.NewStringParser(content)
p := parser.NewStringParser(content, parser.WithSkipValidDirectivesErr())
c, err := p.Parse()
if err != nil {
return