Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

broken on views with folded content ( e.g commit diff ) #1289

Open
shinenelson opened this issue May 4, 2021 · 1 comment
Open

broken on views with folded content ( e.g commit diff ) #1289

shinenelson opened this issue May 4, 2021 · 1 comment
Labels

Comments

@shinenelson
Copy link

Expected Behavior

OctoLinker links the correct repository to the corresponding string in the file

What actually happened?

OctoLinker is ignorant of folded content and links the wrong repositories to the unfolded lines. I do not know how the OctoLinker API actually works. My guess is that the search function looks up only the unfolded lines, but the linking function ( the thing that actually link-ifies the content ) links onto the folded lines too.

URL

caddyserver/caddy@2609a72

Anything else we should know?

Screenshot_20210504_105149

the screenshot is of the file in the URL mentioned above. Lines 13 through 20 were folded initially ( you can notice the missing whitepsace markers ( from Refined GitHub ) there ). I manually expanded the section to hover over one of the folded lines to show the link. The link on line 16 ( hovered ) was actually supposed to be on line 24.

And if you want to count the number of lines, it is the fourth line :

  • during search, it looks up 20 + 4 = 24
  • during link-ifying, it links at 12 + 4 = 16.

Note : this issue impacts split diffs as well, but it is resolved when the folded lines are expanded and OctoLinker does another pass of the file.

@shinenelson shinenelson added the bug label May 4, 2021
@stefanbuck
Copy link
Member

Thanks for the very detailed report, really appreciated. I need to reserve some time to hunt for the root cause and to ensure a fix is not breaking other things.

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

No branches or pull requests

2 participants