nginxinc / crossplane

Quick and reliable way to convert NGINX configurations into JSON and back.
Apache License 2.0
717 stars 86 forks source link

Directives may need to be quoted on build #53

Closed aluttik closed 5 years ago

aluttik commented 5 years ago

Inside of certain blocks such as map, "directives" may contain whitespace characters, so we need to account for that.

For example, the inside of this block:

map $a $b {
  'Client A' 'value';
}

would be converted to this json:

{
    "directive": "Client A",
    "args": ["value"]
}

but that json would be converted back to nginx as:

map $a $b {
  Client A value;
}