github Epistates/treemd v0.5.7

latest releases: v0.6.0, v0.5.12, v0.5.11...
5 months ago

[0.5.7] - 2026-02-26

Added

  • Home/End key bindings - Navigate to first/last with Home/End keys (#43)

    • Works in Normal, Interactive, Help, and FilePicker modes
    • Also added PageUp/PageDown bindings in Normal mode for consistency
  • Directory and multi-file support - Open file picker with directory argument (#43)

    • treemd . opens file picker in current directory
    • treemd docs/ opens file picker in specified directory
    • Multiple file arguments supported (e.g., treemd *.md)
  • Compact tree style - Gapless box-drawing characters for tree visualization (#43)

    • Now uses ├── instead of ├─ (connected, no gaps)
    • Config option tree_style: "compact" (default) or "spaced"
    • Works in both --tree CLI output and query tree output
  • Todo filter for outline - Filter heading tree to show only headings with open todos (#44)

    • Press t to toggle filtering by open todos (- [ ] or * [ ])
    • Shows only headings that contain open todos (directly or in descendants)
    • Preserves hierarchy: parent headings shown if any child has todos
    • Status message shows count of headings with open todos
  • SOTA Content filtering - Robust YAML frontmatter and LaTeX handling (#43)

    • Unicode Approximation: LaTeX math symbols like \alpha, \sum, \infty are now rendered as readable Unicode (α, , ) instead of being stripped.
    • Superscript/Subscript support: Common exponents and indices (like x^2, n_i) are converted to Unicode (, nᵢ).
    • Environment Preservation: Content inside LaTeX environments (like equation or align) is preserved while stripping the tags.
    • hide_frontmatter option strips ---\n...\n--- blocks at document start.
    • hide_latex option handles math and LaTeX commands robustly without "half measures".
    • Aggressive filtering remains available but the standard mode is now preferred.
  • Smart Responsive Tables - Tables now wrap and collapse intelligently (#43)

    • Cell Wrapping: Long content now wraps into multiple lines within columns, ensuring data remains readable even on narrow terminals.
    • Content-weighted widths: Uses 70% average + 30% max for fairer column distribution.
    • Adaptive padding: Dynamically reduces cell padding (2 → 1 → 0) to save space.
    • Unicode ellipsis: Optimized truncation using for maximum information density.
  • File picker quit - Press q to exit file picker dialog (#43)

Fixed

  • EOF scroll behavior - Content no longer scrolls past the last line (#43)
    • Now uses actual rendered line count (not raw markdown lines) for scroll limits
    • Scroll stops when last line is visible at bottom of viewport
    • Consistent behavior across all scroll methods (j/k, Page Up/Down, Home/End)

Technical

  • Config additions (src/config.rs)

    • Added ContentConfig struct with hide_frontmatter, hide_latex, latex_aggressive fields
    • Added tree_style field to UiConfig (defaults to "compact")
    • Added is_compact_tree() helper method to Config
  • Content filtering utilities (src/tui/ui/util.rs)

    • Added strip_frontmatter() for YAML frontmatter removal
    • Added SOTA strip_latex() with Unicode symbol mapping and environment preservation
    • Added wrap_text() utility for Unicode-aware word wrapping
    • Added filter_content() combining all filters
  • Tree rendering (src/parser/document.rs, src/query/output.rs)

    • Added render_box_tree_styled() method with compact parameter
    • Updated format_tree_value() to support compact mode
  • App state (src/tui/app.rs)

    • Added file_picker_dir field for custom directory support
    • Added should_hide_frontmatter() and should_hide_latex() getters
    • Updated scan_markdown_files() to use custom directory
  • Table rendering (src/tui/ui/table.rs, src/tui/ui/mod.rs)

    • Refactored render_table_row to return Vec<Line> for multi-line wrapping
    • Implemented smart wrapping logic using util::wrap_text
    • Propagated width adjustments through nested content structures
    • Comprehensive test updates for new wrapping behavior

Full Changelog: v0.5.6...v0.5.7

Don't miss a new treemd release

NewReleases is sending notifications on new releases.