Md link fix pr - #967
Open
opsec-ai wants to merge 9 commits into
Open
Conversation
Init(): read body from disk when localPath is set, else from memory This fixes bugs with the past two commits where links were being discarded by newModel create when loading markdown file directly, instead of via the built-in markdown find feature.
Date: Mon Jun 1 18:37:15 2026 -0800
modified: ui/ui.go
details: stripAbsolutePath now uses filepath.Rel instead of EvalSymlinks.
That way symlinks keep their own name in the stash.
Tests pass.
Author
|
Fixed merge conflicts with new version |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CONTRIBUTING.md.Follow relative markdown links in the TUI pager (Feature request: follow relative links in TUI mode #441)Follow relative markdown links in the TUI pager (#441) #883
This Feature Request builds on #883 by fixing errors and bugs, allowing full browsing of the markdown documentation tree with the arrow keys.
To make the back arrow keys work, I had to change the receiver types of several functions and update the return values. Follow relative markdown links in the TUI pager (#441) #883 was not working right because functions were working on copies of data and forgetting the nav history.
Example test. Create a .test directory and put some markdown in it. Glow will show all files. 'glow -a' also shows markdown in hidden dirs. Press right arrow on an entry and use up and down-arrow keys to navigate the links, just like
pinfo(bash).├── test
│ │ ├── bug_report.md
│ │ └── feature_request.md
├── README.md
├── test.md
Before Follow relative markdown links in the TUI pager (#441) #883,
glowwouldn't even let me click on local links in the markdown. But there were some issues. I didn't like having to switch between using the arrow keys in the stash and Tab/Enter in the markdown. So I made them both work.I tried to make the local markdown.md file links click-able but link clicking is controlled by the terminal and making that work would require writing a whole new terminal, basically.