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

links with anchors 'file is a directory' #153

Open
BrentLeggett opened this issue May 12, 2022 · 3 comments
Open

links with anchors 'file is a directory' #153

BrentLeggett opened this issue May 12, 2022 · 3 comments
Labels
Waiting for response Waiting for further discussion

Comments

@BrentLeggett
Copy link

Thanks for this extension.

In a php file I have
//LINK docs/Readme.md#my_anchor

in Readme.md I have a line with

But when I click this link, VS code throws an error: unable to open '' File is a directory

If I remove the anchor from the link ie. //LINK docs/Readme.md it works as expected. It opens the file. Is there something I am missing? I am wanting to use this feature to link code to relevant anchors in the documentation. Thanks for your help.

@JordanDi123
Copy link
Member

Hello!

I setup a file structure to try and replicate the issue but in my testing, it appears to work as intended. Could it be that you did not define the id correctly? Here is how I set it up on my end:

image

and, just to show the link working correctly:
Code_dRuyFDf5L7

Hopefully this helps! If you still aren't able to get it to work please provide some more information (screenshots would be great!) and I'll look into this further.

Thank you for using Comment Anchors. :)

@JordanDi123 JordanDi123 added the Waiting for response Waiting for further discussion label Jan 23, 2023
@ricky9075
Copy link

@JordanDi123 , sir, I have a problem, commnet anchors link always link to 0 line, please help me, thank you.
sshot-176

@Challanger524
Copy link

Challanger524 commented Feb 8, 2024

@ricky9075, did you create proper anchor in your Readme.md exactly as: // ANCHOR[id=my_anchor]?
Maybe you are thinking that extension can pick markdown headlines, but it can't

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Waiting for response Waiting for further discussion
Projects
None yet
Development

No branches or pull requests

4 participants