slomkowski / nginx-config-formatter

nginx config file formatter/beautifier written in Python with no additional dependencies.
Apache License 2.0
379 stars 64 forks source link

Multiline values formatting #13

Open dandelionred opened 5 years ago

dandelionred commented 5 years ago

This (it comes from sample nginx magento snippet)

gzip_types
    text/plain
    text/css
    text/js
    text/xml
    text/javascript
    application/javascript
    application/x-javascript
    application/json
    application/xml
    application/xml+rss
    image/svg+xml;

is converted to

gzip_types
text/plain
text/css
text/js
text/xml
text/javascript
application/javascript
application/x-javascript
application/json
application/xml
application/xml+rss
image/svg+xml;

Could it format such multiline values the padded way?

slomkowski commented 3 years ago

In fact, this is a matter of style. Perhaps, current formatting is preferred for some, as shown in #9. I'll probably make an option in FormatterOptions for it. Leaving it open for now.