Forums / Suggestions / Multiline comments in INI-files

Multiline comments in INI-files

Author Message

Peter Rudolfsen

Thursday 12 August 2010 2:23:21 am

From what I know, this is not supported today. Is there any reason for this? It's probably quite easy to implement, and it would allow for more flexible INI files.

One of the use cases would be to have build scripts that comment out parts of the files based on where the application/installation is deployed.

Example:

This could be something in an INI-file. Then the build script would recognize the ?env tags, and then add a surrounding multiline comment around this block, based on what it's built for.

#?env development
 [DebugSettings]
 DebugOutput=enabled
 #env?

To this: (/* */ is just an example, it really could be anything. <!-- --> could also be used)

#?env development
 /*
 [DebugSettings]
 DebugOutput=enabled
 */
 #env?

Stupid idea, or something to take a closer look at?

André R.

Thursday 12 August 2010 5:03:13 am

We plan to use a different parser in the future, so we have no intent in adding features to our current regex parser that will prevent us from moving to a faster & better* / a lot faster** parsers in the future.

* http://ezcomponents.org/docs/tutorials/Configuration#ini-file-format
** http://no.php.net/parse_ini_file

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom