-
Notifications
You must be signed in to change notification settings - Fork 87
Open
Description
Is your feature request related to a problem? Please describe.
I have an nginx config file with whitespace. The whitespace gets removed when building a new file
Describe the solution you'd like
I would like to parse that file, then build the same file with the same whitespace
Additional context
The file parses correctly and recognizes that there is whitespace in the file. I.e.:
{
"directive": "server",
"line": 1,
"args": [],
"block": [
{
"directive": "listen",
"line": 2,
"args": [
"443",
"ssl"
]
},
{
"directive": "open_file_cache",
"line": 4,
"args": [
"max=1000",
"inactive=20s"
]
},
<snip>
There is a newline at line 3.
However, when I build the config from the parsed config, it removes the newline. I can't see any option (either via command-line or python library) like "--whitespace" (I'm using the library)
server {
listen 443 ssl;
open_file_cache max=1000 inactive=20s;
How can I maintain this whitespace? Thanks
Metadata
Metadata
Assignees
Labels
No labels