ini-parser icon indicating copy to clipboard operation
ini-parser copied to clipboard

Inline comments

Open AlexeyTipunin opened this issue 8 years ago • 4 comments

Hello.

Is any possible to use inline comments like this:

Database = TankBattery # Database name

? Thenk you.

AlexeyTipunin avatar Jun 03 '16 12:06 AlexeyTipunin

@AlexeyTipunin I'm so, so sorry I missed this issue! I remember reading the email notifying this issue but I don't know why I removed from my inbox and then forgot about this. My apologies

On your question:

no, inline comments are NOT supported, but that's a bug, not a feature!

The problem is that the parser supports the comment characters in the middle of keys / values (don't know what was I thinking when I made the parser behave like this 😢) The problem is that changing this behaviour will change the way the parser works and it will break compatibility with previous versions (triggering a new Major version of the lib)

I'll start working on correcting this issue and try to mitigate this behaviour while supporting inline comments, so I can skip a new Major version change.

rickyah avatar Jul 21 '16 14:07 rickyah

Hi, Please not forget implement Configuration property like AllowInlineComment for turn inline comment search on and off, because sometime it's need to use ";" or "#" as value part

thanks, Andriy

Malij75 avatar Sep 08 '16 08:09 Malij75

I second this feature request. A lot of the INI files my application needs to parse will contain inline comments. Having this in the configuration options would be incredibly helpful.

Al12rs avatar Mar 25 '19 10:03 Al12rs