Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Semicolon and/or curly brackets inside single/double quotes in single/multi-line directives. #22

Open
amorozkin opened this issue Feb 3, 2022 · 1 comment

Comments

@amorozkin
Copy link
Contributor

From Nginx perspective any of next two constructions is valid:

A.

add_header Strict-Transport-Security "max-age=0; includeSubDomains" always;

B.

add_header Strict-Transport-Security
"
max-age=0
;
includeSubDomains
"
always
;

But both ones can't be parsed correctly.

@amorozkin
Copy link
Contributor Author

amorozkin commented Feb 3, 2022

See no options for now other than to roll back these PRs:

#18
#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.

hackerzgz added a commit to hackerzgz/nginx-config-parser that referenced this issue Feb 25, 2022
@hackerzgz hackerzgz mentioned this issue Feb 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant