| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
😂 what the heck, I guess I'll throw a // nolint on that |
Sorry, something went wrong.
|
Go home linter, you're drunk. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Since I've last touched the lexer in #363 #365 we've had plenty of minor syntax adjustments to the Caddyfile. Took me a long time to get in the headspace to want to tackle updating the lexer, it's quite complicated!
We use this lexer for the official Caddy docs https://caddyserver.com/docs/caddyfile/concepts where Caddy itself serves its own syntax via Markdown. It's awesome that Caddy can highlight its own code 😁
I went through every page in the docs we have to find all the edgecases that were broken in one way or another. I used a go.mod replace in Caddy to point to my checkout of Chroma which I was editing, and used https://github.com/cespare/reflex to watch for my file changes and rebuild+restart Caddy so I could just refresh my browser to see effect of my changes to the lexer. I used this crazy command to do this (had to cross through 3 different git repos with cd 😂)
Added lots more contrived config examples to the caddyfile.actual test to cover most of the changes I've made.
I'm not satisfied with the heredoc (see #929) because I'd like to be able to parse the placeholders (LiteralStringEscape) inside the heredoc text, but I'd probably need to write a custom Mutator to do that and that felt daunting. But good enough for now I think.