Repository navigation
fix(links): Jump to dedicated link targets - #1199
Merged
Merged
Conversation
Following a link to a dedicated target moved the cursor to the enclosing headline instead of the target. The link text was used as an unescaped Lua pattern and matched target names by prefix, so names with pattern characters were not found and similar names were ambiguous. Targets outside any headline section were not searched. Search the whole file for the first target whose name matches exactly and case-insensitively, and place the cursor on it, as Emacs does. Headline titles are still tried when no target matches. AI-assisted: Claude Code
kristijanhusak
approved these changes
Oct 12, 2026
Member
|
I think that you should be able to re-run CI by yourself in case it fails. Also approvals means that you can merge it. |
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.
Links to a dedicated target
<<target>>now jump to the target itself, as in Emacs. The whole file is searched for an exact match, with headlines as the fallback.Before, the link text went into a Lua pattern unescaped, matched by prefix, and only headline sections were searched. So the cursor landed on the headline above the target,
[[foo]]also matched<<foobar>>, targets with-or(in the name were not found, and neither was any target above the first headline.Specs cover the fixed behavior.