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

Follow links with Return fails on anchors #31

Closed
rysson opened this issue Jan 27, 2025 · 6 comments
Closed

Follow links with Return fails on anchors #31

rysson opened this issue Jan 27, 2025 · 6 comments

Comments

@rysson
Copy link

rysson commented Jan 27, 2025

Follow links with Return

It's great but it does not support anchors.
Do nothing on internal link and try to open incorrect files.

Exmaple

foo.md:

# Foo

See [foo](#foo), [bar](bar.md#bar).

bar.md:

# Bar

Enter on #foo do nothing.
Enter on bar.md#bar opens file bar.mdbar (join filename and anchor name).

@ixru
Copy link
Owner

ixru commented Jan 27, 2025

Following a file#anchor link isn't implemented, sorry. The #foo link works for me, I will test some more though.

@rysson
Copy link
Author

rysson commented Jan 27, 2025

I hope you will add file#anhor some day.

Yes, #foo works.
If there was space in the header it is doesn't work because the space is changed to a dash - .

# Foo foo

See [foo](#foo-foo).

@ixru
Copy link
Owner

ixru commented Jan 27, 2025

This should also work now, done in #30

@rysson
Copy link
Author

rysson commented Jan 27, 2025

Excellent. Thanks.

And what now? I should close the issue?
I guess the file#anchor is not so easy to implement.

@ixru
Copy link
Owner

ixru commented Jan 27, 2025

I added file#anchor in 82bbf6d
Tell me if you have more problems, or just close the issue when you feel like it :)

@rysson
Copy link
Author

rysson commented Jan 27, 2025

It works like a harm. Thank you very much. You are awesome.

My tests fails for a while because sometime I have use alternative h1/h2 headers, example:

Foo
---

It's not so impotent and I close this issue.
Of course if have to much time you can add support too 😆

@rysson rysson closed this as completed Jan 27, 2025
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

No branches or pull requests

2 participants