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
fix: preserve periods in version numbers with kebab_filenames mode
Fixes#423
Implements maintainer feedback to preserve periods in version numbers
(e.g., "2.0.0") instead of converting them to hyphens. Uses
mimetypes.guess_type() to detect real file extensions and avoid
misinterpreting periods as extensions.
Changes:
- Add has_valid_file_extension() helper using mimetypes.guess_type()
- Modify generate_permalink() to conditionally call os.path.splitext()
only when real file extensions are detected
- Update regex patterns to preserve periods in both CJK and non-CJK paths
- Update 19 test cases to expect period preservation
Examples:
- "Test 3.0 Version" → test-3.0-version.md (was: test-3-0-version.md)
- "Version 1.2.3 Release" → version-1.2.3-release.md
🤖 Generated with Claude Code (https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
Signed-off-by: Cedric Hurst <[email protected]>
0 commit comments