Vscode-jupyter: Internal links in Jupyter Notebook doesn't work

Created on 20 Jul 2020  ·  9Comments  ·  Source: microsoft/vscode-jupyter

When i try to create an internal link in the jupyter notebook it doesn't work.
i used this code:

[reference](#reference)

some stuff
## Reference

In any way it doesn't link me to that part of the notebook

bug

Most helpful comment

@FreezeHands thanks for reporting this. I just took a look and it does look like we are not respecting internal jupyter markdown links. In Jupyter it will jump to that markdown section, but nothing in vscode. We'll discuss prioritization of this issue in triage.

All 9 comments

@FreezeHands thanks for reporting this. I just took a look and it does look like we are not respecting internal jupyter markdown links. In Jupyter it will jump to that markdown section, but nothing in vscode. We'll discuss prioritization of this issue in triage.

This also appears to be true of links to the settings in vscode. For example, the warning you get from an output being truncated is a link that when clicked does nothing, and is not right-clickable.

Output was trimmed for performance reasons.
To see the full output set the setting "python.dataScience.textOutputLimit" to 0.
...

This may be a regression (the second issue, specifically)

No root cause yet. But interestingly enough I do repro the second issue. And the second issue (the link to our settings) only repros from a notebook, it works from the interactive window, even though they share most of their code. I'll probably split out this second issue as it's a regression and doesn't look like the same issue as the markdown section internal links.

Hello , i tried to source an image in jupyter notebook from external web url and its also not working in markdown cell, is it part of the same issue
ex-

< img src="https://xyz.com/image.jpg" width=500 height=500 / >

@MrJ1ggy This issue is specific to just the internal markdown links (where you can link to a section heading in markdown). Could you please open up a new issue for your problem with an external image link? Will help us to track the issues separately as they are not related.

Hi @FreezeHands, the solution is this -- change "## Reference" to "## reference". The destination name has to be the same as what is specified in the parentheses with the # symbol.


```csharp
reference
some stuff

reference

```

Hope this works

Hi @FreezeHands, the solution is this -- change "## Reference" to "## reference". The destination name has to be the same as what is specified in the parentheses with the # symbol.

[reference](#reference)
some stuff
## reference

Hope this works

Hi @jess-data , I tried your solution but the result is the same. The text is clickable as if it is a link but it doesn't link to the heading. It seems that the linking doesn't even work when the link is between different cells.
I attached a jupyter notebook example from VS Code 1.50.1, my current version.

example.zip

Yes same problem, internal linking does not work in VScodeJupyter notebook. Even tried this and does not work :

_One cell:_

%%html
<a href=“#my-unique-id-in-this-page”>The link you want</a>

_Another cell:_

%%html
<div id=“my-unique-id-in-this-page”>The content you want to link to</div> 
Was this page helpful?
0 / 5 - 0 ratings

Related issues

qdlmcfresh picture qdlmcfresh  ·  3Comments

jediyoda36 picture jediyoda36  ·  4Comments

janosh picture janosh  ·  4Comments

hyderkh picture hyderkh  ·  4Comments

ashtou picture ashtou  ·  3Comments