Closed matthewpi closed 6 months ago
Thank you!!
until an un-indented closing bracket (
}
) is found.
Is that actually needed? I think it would work fine without it, no? Cause there's no other language that follows after the JSON section.
Doesn't really matter I guess, just wanted to mention.
@mholt do you agree with .caddyfiletest
extension? If so let's merge this then I'll do a PR to the caddy repo to rename all the files *.txt
-> *.caddyfiletest
I poked @mholt about this again and got a :+1: so let's merge :)
This took longer than I expected to write, the solution was so simple but I just had to make it difficult for myself.
Utilizes a new
.caddyfiletest
(or.Caddyfiletest
) file extension.The grammar works by looking for
^-{10}$
(10-
characters in a row on a line by themselves, no preceding or trailing white-space will be accepted), after that an embedded JSON section is enabled until an un-indented closing bracket (}
) is found.Closes #299
/cc @francislavoie @mholt