You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add strip_section_whitespace parameter to address issue #4
Add opt-in Unicode whitespace stripping for section names (issue #4)
Changes:
- Add strip_section_whitespace parameter to IniConfig.parse()
- Default: False (preserves backward compatibility)
- When True: strips Unicode whitespace from section names
- Document Unicode whitespace handling in CHANGELOG
- Python 3's str.strip() has handled Unicode since Python 3.0 (2008)
- iniconfig 2.0.0+ benefits from this automatically
- Values and key names already strip Unicode whitespace correctly
- Add tests for Unicode whitespace handling
Background:
Since iniconfig moved to Python 3 only in version 2.0.0, all strings are
Unicode by default. Python 3's str.strip() handles Unicode whitespace
characters (NO-BREAK SPACE, EN QUAD, IDEOGRAPHIC SPACE, etc.) automatically.
This addresses the core concern in issue #4 for values and key names.
The new strip_section_whitespace parameter provides opt-in stripping for
section names, which were not previously stripped for backward compatibility.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
0 commit comments