Age | Commit message (Collapse) | Author |
|
* caddyfile(formatter): fix nesting not decrementing
This is an extremely weird edge-case where if you had a environment variable {}
on one line, a comment on the next line, and the closing of the block on the
following line; the rest of the Caddyfile would be indented further than it
should've been.
ref; https://github.com/matthewpi/vscode-caddyfile-support/issues/13
* run gofmt
* fmt: better way of handling edge case
|
|
|
|
* caddyconfig: Only parse # as start of comment if preceded by space
* caddyconfig: Simplify # logic using len(val), add a test
|
|
|
|
|
|
This fixes indentation for blocks starting with
a brace as:
```Caddyfile
{
...
}
```
Fixes #3144
Signed-off-by: Vaibhav <vrongmeal@gmail.com>
|
|
Previously the formatter did not include support for
blocks inside other blocks. Hence the formatter could
not indent some files properly. This fixes it.
Fixes #3104
Signed-off-by: Vaibhav <vrongmeal@gmail.com>
|
|
This takes the config file as input and formats it.
Prints the result to stdout. Can write changes to
file if `--write` flag is passed.
Fixes #3020
Signed-off-by: Vaibhav <vrongmeal@gmail.com>
|