summaryrefslogtreecommitdiff
path: root/caddyconfig
diff options
context:
space:
mode:
Diffstat (limited to 'caddyconfig')
-rwxr-xr-xcaddyconfig/caddyfile/dispenser.go15
1 files changed, 5 insertions, 10 deletions
diff --git a/caddyconfig/caddyfile/dispenser.go b/caddyconfig/caddyfile/dispenser.go
index 93f451e..938c985 100755
--- a/caddyconfig/caddyfile/dispenser.go
+++ b/caddyconfig/caddyfile/dispenser.go
@@ -236,18 +236,13 @@ func (d *Dispenser) NewFromNextTokens() *Dispenser {
for d.NextArg() {
tkns = append(tkns, d.Token())
}
- if d.Next() && d.Val() == "{" {
- tkns = append(tkns, d.Token())
- for d.NextBlock() {
- for d.Nested() {
- tkns = append(tkns, d.Token())
- d.NextBlock()
- }
+ for d.NextBlock() {
+ for d.Nested() {
+ tkns = append(tkns, d.Token())
+ d.NextBlock()
}
- tkns = append(tkns, d.Token())
- } else {
- d.cursor--
}
+ tkns = append(tkns, d.Token())
return NewDispenser(tkns)
}