matomo-org / component-ini

Read and write INI configurations.
GNU Lesser General Public License v3.0
50 stars 25 forks source link

Split comments on blank lines #9

Closed c960657 closed 5 years ago

c960657 commented 6 years ago

Ini files often contains documentation for settings that are commented out.

In the example below, the description of instance_id should obviously not be included in the description of api_service_url.

This PR changes the parser, so that comments are broken on empty lines.

Example:

; If you use this Matomo instance over multiple hostnames, Matomo will need to know
; a unique instance_id for this instance, so that Matomo can serve the right custom logo and tmp/* assets,
; independently of the hostname Matomo is currently running under.
; instance_id = stats.example.com

; The API server is an essential part of the Matomo infrastructure/ecosystem to
; provide services to Matomo installations, e.g., getLatestVersion and
; subscribeNewsletter.
api_service_url = http://api.matomo.org
tsteur commented 5 years ago

Makes sense 👍