summaryrefslogtreecommitdiff
path: root/modules/logging/encoders.go
diff options
context:
space:
mode:
authorMatthew Holt <mholt@users.noreply.github.com>2019-09-28 21:18:36 -0600
committerMatthew Holt <mholt@users.noreply.github.com>2019-09-28 21:18:36 -0600
commitc12bf4054c37b88eb37f7c59631d55ae512bcd29 (patch)
tree29f4402f391e1238c3a20f792bdbd7cee96bf505 /modules/logging/encoders.go
parent735d6ce405c353b5a9f65ead769d5e7319fe71ce (diff)
caddyfile: Fix lexer behavior with regards to escaped newlines
Newlines (\n) can be escaped outside of quoted areas and the newline will be treated as whitespace but not as an actual line break. Escaping newlines inside a quoted area is not necessary, and because quotes trigger literal interpretation of the contents, the escaping backslash will be parsed as a literal backslash, and the newline will not be escaped. Caveat: When a newline is escaped, tokens after it until an unescaped newline will appear to the parser be on the same line as the initial token after the last unescaped newline. This may technically lead to some false line numbers if errors are given, but escaped newlines are counted so that the next token after an unescaped newline is correct. See #2766
Diffstat (limited to 'modules/logging/encoders.go')
0 files changed, 0 insertions, 0 deletions