rickyah / ini-parser

Read/Write an INI file the easy way!
MIT License
969 stars 240 forks source link

Let relaxed mode skip un parsable lines #24

Closed rickyah closed 11 years ago

rickyah commented 11 years ago

Original author: ileng...@gmail.com (February 23, 2012 10:06:02)

What steps will reproduce the problem?

  1. Set the Relaxed ini format mode to true
  2. Load ini data with 'win]' on a line. In this case the section is missing the '['
  3. Loading throws ParsingException

What is the expected output? What do you see instead? the line 'win]' is ignored and any parameters below are treated as part if the previous seciton. This is the same behaviour as GetPrivateProfileString(..) in the Win32 API

What version of the product are you using? On what operating system? 1.7.1.0

Original issue: http://code.google.com/p/ini-parser/issues/detail?id=24

rickyah commented 11 years ago

From rickyAH on April 26, 2012 22:36:48 This issue was closed by revision 0a0123f66432.

rickyah commented 11 years ago

From rickyAH on April 26, 2012 22:38:33 Using the new IIniDataConfiguration.SkipInvalidLines property in the IINiDataConfiguration object to implement this behaviour. (Accesible with the .Configuration property of IniDataParser class) to

See unit test for issue 24 for details.

Fixed in commit: 0a0123f