pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/textproc/treemd



Module Name:    pkgsrc
Committed By:   pin
Date:           Sat Dec  6 14:01:29 UTC 2025

Modified Files:
        pkgsrc/textproc/treemd: Makefile cargo-depends.mk distinfo

Log Message:
textproc/treemd: update to 0.4.6

[0.4.6] - 2025-12-05

Fixed the non-existing file open modal.

The issue was that both exit_interactive_mode() and exit_link_follow_mode() unconditionally set self.mode = AppMode::Normal, which was overwriting the ConfirmFileCreate mode set by load_file() or 
load_wikilink() when a file doesn't exist.

[0.4.5] - 2025-12-04
Added

    Document overview for headerless files - Files without a top-level heading now show a "(Document)" entry in the outline (#25)
        Displays 📄 icon in outline for the document overview
        Shows entire file content including tables and text before the first heading
        Automatically added when there's preamble content or no headings at all

    Wikilink rendering in content - Wikilinks now render as clickable links in the content pane
        [[target]] displays as link with target as text
        [[target|alias]] displays alias text linking to target
        Works in both interactive mode and link follow mode
        Preprocessing converts wikilinks to standard markdown links for consistent parsing

    Links with spaces in URLs - Links like [text](path/to/my file.md) now work correctly
        CommonMark doesn't support spaces in URLs, but many wikis use them
        Preprocessing converts to angle bracket syntax for compatibility

    File creation prompts - Following links to non-existent files prompts to create them
        Confirmation dialog with [y] to create, [n/Esc] to cancel
        Creates file with default heading based on filename
        Automatically opens the newly created file
        Works for both relative links and wikilinks

    Page navigation in interactive mode - Scroll content while staying in interactive mode
        Press u or PgUp to scroll up
        Press d or PgDn to scroll down
        Maintains element selection while scrolling

Fixed

    Screen artifacts when scrolling - Fixed rendering artifacts caused by tab characters in code blocks (#26)
        Tabs are now converted to 4 spaces in code block syntax highlighting
        Also applies to raw markdown view for consistency

    Shift+Tab navigation - Fixed Shift+Tab not working for backwards navigation (#18)
        Now uses KeyCode::BackTab instead of checking modifiers
        Works correctly in both interactive mode and link follow mode

    Interactive mode scroll preservation - Entering interactive mode no longer jumps to first element
        Now selects the element closest to current scroll position
        Preserves user's view when toggling interactive mode

    Wikilink anchor support - Wikilinks now support section anchors
        [[filename#section]] loads file and jumps to heading
        [[#section]] jumps to heading in current document

    Relative file link improvements - Better handling of wiki-style links without extensions
        Files without extension now try .md first before opening in editor
        Improves compatibility with Obsidian and other wiki tools

Changed

    Interactive mode status bar - Updated to show page navigation hints
        Now displays: [INTERACTIVE] Tab:Next Shift+Tab:Prev u/d:Page Esc:Exit

    Help text updated - Interactive mode section includes new keybindings
        Added u/d for page up/down navigation

Technical

    Wikilink preprocessing (src/parser/content.rs)
        preprocess_wikilinks() converts [[target]] to [target](wikilink:target) before parsing
        preprocess_links_with_spaces() wraps URLs containing spaces in angle brackets
        Both use compiled regex with OnceLock for performance

    File creation flow (src/tui/app.rs)
        AppMode::ConfirmFileCreate for pending file creation state
        pending_file_create and pending_file_create_message fields
        confirm_file_create() and cancel_file_create() methods

    Interactive mode improvements (src/tui/interactive.rs)
        enter_at_scroll_position() selects element closest to scroll position
        Elements sorted by line position after indexing for proper navigation order
        Wikilinks detected via wikilink: URL prefix from preprocessing

    Page navigation (src/tui/app.rs, src/tui/mod.rs)
        scroll_page_down_interactive() and scroll_page_up_interactive() methods
        Keybindings for u/d/PgUp/PgDn in interactive mode

    File creation popup (src/tui/ui/popups.rs)
        render_file_create_confirm() renders themed confirmation dialog


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 pkgsrc/textproc/treemd/Makefile \
    pkgsrc/textproc/treemd/cargo-depends.mk pkgsrc/textproc/treemd/distinfo

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/textproc/treemd/Makefile
diff -u pkgsrc/textproc/treemd/Makefile:1.8 pkgsrc/textproc/treemd/Makefile:1.9
--- pkgsrc/textproc/treemd/Makefile:1.8 Thu Dec  4 18:45:09 2025
+++ pkgsrc/textproc/treemd/Makefile     Sat Dec  6 14:01:29 2025
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.8 2025/12/04 18:45:09 pin Exp $
+# $NetBSD: Makefile,v 1.9 2025/12/06 14:01:29 pin Exp $
 
-DISTNAME=      treemd-0.4.4
+DISTNAME=      treemd-0.4.6
 CATEGORIES=    textproc
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=Epistates/}
 GITHUB_TAG=    v${PKGVERSION_NOREV}
Index: pkgsrc/textproc/treemd/cargo-depends.mk
diff -u pkgsrc/textproc/treemd/cargo-depends.mk:1.8 pkgsrc/textproc/treemd/cargo-depends.mk:1.9
--- pkgsrc/textproc/treemd/cargo-depends.mk:1.8 Thu Dec  4 18:45:09 2025
+++ pkgsrc/textproc/treemd/cargo-depends.mk     Sat Dec  6 14:01:29 2025
@@ -1,4 +1,4 @@
-# $NetBSD: cargo-depends.mk,v 1.8 2025/12/04 18:45:09 pin Exp $
+# $NetBSD: cargo-depends.mk,v 1.9 2025/12/06 14:01:29 pin Exp $
 
 CARGO_CRATE_DEPENDS+=  addr2line-0.25.1
 CARGO_CRATE_DEPENDS+=  adler2-2.0.1
Index: pkgsrc/textproc/treemd/distinfo
diff -u pkgsrc/textproc/treemd/distinfo:1.8 pkgsrc/textproc/treemd/distinfo:1.9
--- pkgsrc/textproc/treemd/distinfo:1.8 Thu Dec  4 18:45:09 2025
+++ pkgsrc/textproc/treemd/distinfo     Sat Dec  6 14:01:29 2025
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.8 2025/12/04 18:45:09 pin Exp $
+$NetBSD: distinfo,v 1.9 2025/12/06 14:01:29 pin Exp $
 
 BLAKE2s (addr2line-0.25.1.crate) = cc5c422ec48ccef5c2c46379d2f600644609490afafea5020f2020815d1146e6
 SHA512 (addr2line-0.25.1.crate) = c400f3b6ccaff8a1c0d7d82c708a1784b8fd5ba64b6e420e85819d59b1cadb55fa59c852925093b921469f272d1d5140cf12f013ae75d1e1bc85021097df8fc2
@@ -627,9 +627,9 @@ Size (tracing-subscriber-0.3.20.crate) =
 BLAKE2s (tree_magic_mini-3.2.0.crate) = e3c62f82f8c429d5628526addb79cc9cce1ab85a82c92a54f7d2b63473d13668
 SHA512 (tree_magic_mini-3.2.0.crate) = 7151639da4a20f3e0da8059f0b6b05dbb497462ce0ca23df8b07c5e515d49dbb905371259a51f5cba634f62b1dfb9d79aa0ee212e31a74f46f30715a82ee4e8d
 Size (tree_magic_mini-3.2.0.crate) = 15962 bytes
-BLAKE2s (treemd-0.4.4.tar.gz) = 38ee228ed114d696f67f1a182d07e8648468a94d9cd66bb5e3b5c3bebbc25f2c
-SHA512 (treemd-0.4.4.tar.gz) = 1d3b5e028aa42f94f2cdaf7506ded1bab4dc1cc1a3cb72caead5e0a189d3ae13e3dcc5a0364046a2d8759d8e5f441e03532e2ef970d7e8e7d4b2c0fe31542dfb
-Size (treemd-0.4.4.tar.gz) = 388284 bytes
+BLAKE2s (treemd-0.4.6.tar.gz) = 45f3cd3900e8366b5980ca00ed007dd5a71ade7031819ff2b6d4161d1a57adb7
+SHA512 (treemd-0.4.6.tar.gz) = b1a26a5deb014b389c71e5a5dfb182abf6d1c9626686b6291f0be48591128e60b8e4f6153e94f1a57ec5349de95def3db39d92b4021ab610375a275b6b2fbe2c
+Size (treemd-0.4.6.tar.gz) = 393886 bytes
 BLAKE2s (unicase-2.8.1.crate) = 6a87002c4bd702bb961347b5ecac9404f9a65359b563c199608a3eaaf66195ea
 SHA512 (unicase-2.8.1.crate) = 99a3944a5c987376bdea5fe6c0797e881bc8e6f629c56120ce811c8ebbed0a3ba24617decb74d6939699c8fc994c662eb292869ab407c0ba0ec460a32ede0190
 Size (unicase-2.8.1.crate) = 24088 bytes



Home | Main Index | Thread Index | Old Index