diff options
author | WeidiDeng <weidi_deng@icloud.com> | 2023-02-17 08:08:36 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-16 17:08:36 -0700 |
commit | 8bc05e598da0068358a2876c45f92f2c77455341 (patch) | |
tree | 4110cd23fd0ddd0374bb909c1c4c53e0c9692176 /cmd | |
parent | bf54892a73373637901c13e018b20cfac15878b4 (diff) |
caddyfile: Implement variadics for import args placeholders (#5249)
* implement variadic placeholders
imported snippets reflect actual lines in file
* add import directive line number for imported snippets
add tests for parsing
* add realfile field to help debug import cycle detection.
* use file field to reflect import chain
* Switch syntax, deprecate old syntax, refactoring
- Moved the import args handling to a separate file
- Using {args[0:1]} syntax now
- Deprecate {args.*} syntax
- Use a replacer map for better control over the parsing
- Add plenty of warnings when invalid placeholders are detected
- Renaming variables, cleanup comments for readability
- More tests to cover edgecases I could think of
- Minor cleanup to snippet tracking in tokens, drop a redundant boolean field in tokens
---------
Co-authored-by: Francis Lavoie <lavofr@gmail.com>
Diffstat (limited to 'cmd')
0 files changed, 0 insertions, 0 deletions