diff options
author | Matthew Holt <mholt@users.noreply.github.com> | 2019-09-28 21:18:36 -0600 |
---|---|---|
committer | Matthew Holt <mholt@users.noreply.github.com> | 2019-09-28 21:18:36 -0600 |
commit | c12bf4054c37b88eb37f7c59631d55ae512bcd29 (patch) | |
tree | 29f4402f391e1238c3a20f792bdbd7cee96bf505 /modules/caddytls | |
parent | 735d6ce405c353b5a9f65ead769d5e7319fe71ce (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/caddytls')
0 files changed, 0 insertions, 0 deletions