[0.1.6] - 2025-01-09
Fixed
- TUI section extraction with inline markdown - Fixed critical bug where selecting headings with inline formatting (like
**bold**) would display the entire document instead of just that section - JSON output content extraction - Fixed nested JSON output where parent sections incorrectly included child heading text in their content
- Parent directory completions - Shell completions now work with
../relative paths and absolute paths, enabling navigation to parent directories
Added
- Offset-based parsing - Implemented pulldown-cmark's
into_offset_iter()for direct byte offset tracking, eliminating fragile string searching - Shared utilities module - Created
parser/utils.rswithstrip_markdown_inline()andget_heading_level()helpers - Comprehensive test suite - Added 8+ new tests covering bold headings, numbered headings, offset tracking, and section extraction edge cases
- Context-aware completions - Upgraded from
ArgValueCandidatestoArgValueCompleterfor dynamic path-based completions
Changed
- Heading struct enhancement - Added
offset: usizefield to store byte position for O(1) section extraction - Parser optimization - Changed from O(n²) string searching to O(n) offset-based extraction
- Code deduplication - Eliminated 40+ lines of duplicate code by centralizing utilities
- Completion logic - Completions now parse input path to determine target directory and filter appropriately
Technical
- DRY principle compliance - Removed duplicate
strip_markdown_inlineandget_heading_levelfunctions - Best practices adoption - Using pulldown-cmark's built-in offset tracking as recommended by Rust markdown ecosystem
- Performance improvement - Section extraction now O(1) lookup instead of O(n) string search
- Robustness improvement - Handles all inline markdown formatting (bold, italic, code, strikethrough) correctly
- Architecture cleanup - Better separation of concerns with dedicated utils module
- Zero clippy warnings - Clean codebase with all lints addressed
Full Changelog: v0.1.5...v0.1.6