nginxinc / nginx-go-crossplane

A library for working with NGINX configs in Go
Apache License 2.0
52 stars 14 forks source link

fix: Include parsed comments between arguments only when ParseComment s is true #57

Closed rshyamsu closed 1 year ago

rshyamsu commented 1 year ago

Comments between arguments should be added to the parsed result only if the ParseComments ParseOption is true. This check was previously missing and has been added as part of this fix.

A unit test has also been added to validate this.

Proposed changes

Describe the use case and detail of the change. If this PR addresses an issue on GitHub, make sure to include a link to that issue using one of the supported keywords here in this description (not in the title of the PR).

Checklist

Before creating a PR, run through this checklist and mark each as complete.