mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 02:15:48 +02:00
fix: Problem with block directives #77
This commit is contained in:
parent
cba0028c4f
commit
6b9ebbfcc6
1 changed files with 8 additions and 2 deletions
|
@ -53,8 +53,14 @@ func (l *NgxLocation) parseLocation(directive gonginx.IDirective, deep int) {
|
|||
l.Content += strings.Repeat("\t", deep) + c + "\n"
|
||||
}
|
||||
}
|
||||
l.Content += strings.Repeat("\t", deep) + location.GetName() + " " + strings.Join(location.GetParameters(), " ") + ";\n"
|
||||
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 {
|
||||
l.Content += " { \n"
|
||||
l.parseLocation(location, deep+1)
|
||||
l.Content += " } \n"
|
||||
} else {
|
||||
l.Content += ";\n"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue