Open amorozkin opened 2 years ago
See no options for now other than to roll back these PRs:
https://github.com/webantic/nginx-config-parser/pull/18 https://github.com/webantic/nginx-config-parser/pull/20
And use https://github.com/nginxinc/crossplane tool to get "normalised" input config:
crossplane parse --indent=4 --combine /etc/nginx/nginx.conf > nginx_crossplane_parse.json PYTHONIOENCODING=UTF-8 crossplane build --stdout nginx_crossplane_parse.json > nginx_crossplane_build.conf
It would eliminate both multi-line blocks and multiblok lines.
The Nginx crossplane tool has portings to Go and Ruby - not to JS so for.
From Nginx perspective any of next two constructions is valid:
A.
B.
But both ones can't be parsed correctly.