Treat mutli-line parameters correctly
Gaibhne opened this issue · comments
Gaibhne commented
I think the following is a common use case of how people want their config files to look:
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
After running the formatter, neither outcome looks appealing to me:
With -a
/--align
:
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
Without -a
/--align
:
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
Gaibhne commented
Come to think about it, I think the -a
variant is even actually a bug: it's inserting additional spaces/tabs in the log format string, which I would think would lead to the logs looking differently after formatting the config.