Skip to content

Conversation

@rundel
Copy link
Contributor

@rundel rundel commented Sep 19, 2025

This is a pass at addressing the issue referenced in #683 - my understanding of the problem is that the default cli theme is causing the fs_path object to first be rendered as a link and then there is a second pass by .href or .run that tries to wrap that in a new link and these don't get along.

My proposed solution is just a quick check at the beginning of make_link_href() and make_link_run() for the presence of an existing link and if detected then using ansi_strip() to remove the existing link before generating the new link. This may be a bit crude, and might nuke other things it shouldn't.

There are probably edge cases that I have not considered but I tried testing all of the other link methods and they already had some kind of existing link detection I believe.

Adding fs to suggests seemed like the path of least resistance but if that is not desirable then it should be avoidable by more carefully constructing the tests.

The major issue seems to be resolved but I am not 100% on if the output is exactly as desired in all test cases but everything looked reasonable to me based on the snapshots.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant