vscode-comment-anchors icon indicating copy to clipboard operation
vscode-comment-anchors copied to clipboard

links with anchors 'file is a directory'

Open BrentLeggett opened this issue 2 years ago • 3 comments

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.

BrentLeggett avatar May 12 '22 05:05 BrentLeggett

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 avatar Jan 23 '23 19:01 JordanDi123

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

ricky9075 avatar Jul 27 '23 03:07 ricky9075

@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

Challanger524 avatar Feb 08 '24 11:02 Challanger524