We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cba0028 commit 6b9ebbfCopy full SHA for 6b9ebbf
server/pkg/nginx/parse.go
@@ -53,8 +53,14 @@ func (l *NgxLocation) parseLocation(directive gonginx.IDirective, deep int) {
53
l.Content += strings.Repeat("\t", deep) + c + "\n"
54
}
55
56
- l.Content += strings.Repeat("\t", deep) + location.GetName() + " " + strings.Join(location.GetParameters(), " ") + ";\n"
57
- l.parseLocation(location, deep+1)
+ l.Content += strings.Repeat("\t", deep) + location.GetName() + " " + strings.Join(location.GetParameters(), " ")
+ if location.GetBlock() != nil && location.GetBlock().GetDirectives() != nil {
58
+ l.Content += " { \n"
59
+ l.parseLocation(location, deep+1)
60
+ l.Content += " } \n"
61
+ } else {
62
+ l.Content += ";\n"
63
+ }
64
65
66
0 commit comments