I do something similar to this in some backend config management code I wrote awhile back. I've created a gist with some code snippets to help understand how I'm reading/writing the config.
https://gist.github.com/lordnynex/1a568e54b5d1af38f549 Obviously this is not what you're looking for, and pretty printing feels less pretty when your code is formatting it, but this sufficiently meets your criteria with a bit of work. Side note, I am not the original author of the grammar. I'd love to give him credit, but it was so long ago I can't find the original. On Mon, May 19, 2014 at 4:17 PM, Dustin Oprea <[email protected]>wrote: > On Mon, May 19, 2014 at 7:12 PM, Lyle <[email protected]> wrote: > >> It's kind of along the right lines, but I need to keep comments, etc. >> Just have consistent whitespace more than anything else. >> >> > You might write your own and make it available. > > > > Dustin > > > >> >> Lyle >> >> >> On 19/05/2014 19:59, Kurt Cancemi wrote: >> >> Hello, >> >> Would >> this<https://github.com/lovette/nginx-tools/tree/master/nginx-minify-conf>suit >> your needs? And the nginx configuration files are written in there own >> language/syntax. >> >> >> On Mon, May 19, 2014 at 2:49 PM, Lyle <[email protected]> wrote: >> >>> Is there a pretty printer for this file? It doesn't seem to be in any >>> particular language. I tried a JS beautifier but that broke things. >>> >>> >>> Lyle >>> >>> >>> _______________________________________________ >>> nginx mailing list >>> [email protected] >>> http://mailman.nginx.org/mailman/listinfo/nginx >>> >> >> >> >> _______________________________________________ >> nginx mailing >> [email protected]http://mailman.nginx.org/mailman/listinfo/nginx >> >> >> >> _______________________________________________ >> nginx mailing list >> [email protected] >> http://mailman.nginx.org/mailman/listinfo/nginx >> > > > _______________________________________________ > nginx mailing list > [email protected] > http://mailman.nginx.org/mailman/listinfo/nginx >
_______________________________________________ nginx mailing list [email protected] http://mailman.nginx.org/mailman/listinfo/nginx
