diff options
-rwxr-xr-x | caddyconfig/caddyfile/dispenser.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/caddyconfig/caddyfile/dispenser.go b/caddyconfig/caddyfile/dispenser.go index 6afbd77..5b90b73 100755 --- a/caddyconfig/caddyfile/dispenser.go +++ b/caddyconfig/caddyfile/dispenser.go @@ -275,6 +275,10 @@ func (d *Dispenser) NewFromNextTokens() *Dispenser { if openedBlock { // include closing brace accordingly tkns = append(tkns, d.Token()) + // since NewFromNextTokens is intended to consume the entire + // directive, we must call Next() here and consume the closing + // curly brace + d.Next() } return NewDispenser(tkns) } |