mirror of
https://github.com/caddyserver/caddy.git
synced 2025-12-08 06:09:53 +00:00
caddyfile: Allow heredoc blank lines (#6051)
This commit is contained in:
parent
4181c79a81
commit
d9aded016c
2 changed files with 47 additions and 0 deletions
|
|
@ -313,6 +313,11 @@ func (l *lexer) finalizeHeredoc(val []rune, marker string) ([]rune, error) {
|
|||
// iterate over each line and strip the whitespace from the front
|
||||
var out string
|
||||
for lineNum, lineText := range lines[:len(lines)-1] {
|
||||
if lineText == "" {
|
||||
out += "\n"
|
||||
continue
|
||||
}
|
||||
|
||||
// find an exact match for the padding
|
||||
index := strings.Index(lineText, paddingToStrip)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue