summaryrefslogtreecommitdiff
path: root/caddyconfig/caddyfile/formatter.go
AgeCommit message (Collapse)Author
2022-09-15Fix #4169 (correct e6c58fd)Matthew Holt
2022-09-15caddyfile: Prevent infinite nesting on fmt (fix #4175)Matthew Holt
2021-05-10caddyfile: Fix `caddy fmt` nesting not decrementing (#4157)Matthew Penner
* 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
2020-12-16caddyfile: Fix minor bug in formatterMatthew Holt
2020-05-05caddyconfig: Don't start comments in middle of tokens (#3267)Francis Lavoie
* caddyconfig: Only parse # as start of comment if preceded by space * caddyconfig: Simplify # logic using len(val), add a test
2020-03-29caddyfile: Minor fixes to the formatterMatthew Holt
2020-03-25caddyfile: Formatter enhancementsMatthew Holt
2020-03-17cmd: fmt: Fix brace opening block indentation (#3153)Vaibhav
This fixes indentation for blocks starting with a brace as: ```Caddyfile { ... } ``` Fixes #3144 Signed-off-by: Vaibhav <vrongmeal@gmail.com>
2020-02-29fmt: Add support for block nesting. (#3105)Vaibhav
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>
2020-02-29cmd: Add `caddy fmt` command. (#3090)Vaibhav
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>