Skip to content

Conversation

@paris3200
Copy link
Owner

@paris3200 paris3200 commented Jul 24, 2025

Summary

  • Fix gf command to properly follow wikilinks with pipe-separated display text
  • Extract only the filename part from links like [[some/long-filename|Short title]]
  • Ignore display text after the pipe separator when resolving file paths

Test plan

  • Test gf on links without pipe separator (existing functionality)
  • Test gf on links with pipe separator like [[file|display text]]
  • Verify file navigation works correctly in both cases

Extract only the filename part from wikilinks when following with gf,
ignoring display text after pipe separator (e.g., [[file|display]] -> file).
Add test cases for:
- Basic wikilink following
- Pipe-separated display text links (main fix)
- Links with paths and pipe separators
- Multiple pipe characters in display text
- Fuzzy search fallback functionality
- Error handling for missing files
- Graceful handling when cursor not on wikilink
@paris3200 paris3200 merged commit 9ed2fe3 into main Jul 24, 2025
4 checks passed
@paris3200 paris3200 deleted the fix/gf-pipe-separator-links branch July 24, 2025 02:15
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.

2 participants