StarlaneStudios / vscode-comment-anchors

⚓A Visual Studio Code extension that adds support for comment anchors 🔭
https://marketplace.visualstudio.com/items?itemName=ExodiusStudios.comment-anchors
MIT License
212 stars 33 forks source link

links with anchors 'file is a directory' #153

Open BrentLeggett opened 2 years ago

BrentLeggett commented 2 years ago

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 commented 1 year ago

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. :)

ricky9075 commented 1 year ago

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

Challanger524 commented 8 months ago

@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