Markdown Overview Buttons Tabs Footnotes Collapse ToC Navigation Formula Page-Specific Meta Custom Components
If a line in a code-snippet contains a comment has the syntax // @see somelink
,
then when the line is hovered a clickable link to link
will be displayed:
1link```cpp
2linkvoid func() { // @see http://www.cplusplus.com/doc/tutorial/functions/
3link}
4link```
1link```js
2linkfunction func() { /* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Functions */
3link}
4link```
1link```python
2linkdef func(): #@see https://www.learnpython.org/en/Functions
3link pass
4link```
1link```html
2link<div hidden></div> <!-- @see https://www.w3schools.com/tags/att_global_hidden.asp -->
3link```
1linkvoid func() { // @see http://www.cplusplus.com/doc/tutorial/functions/
2link}
1linkfunction func() { /* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Functions */
2link}
1linkdef func(): #@see https://www.learnpython.org/en/Functions
2link pass
1link<div hidden></div> <!-- @see https://www.w3schools.com/tags/att_global_hidden.asp -->
You can also use markdown link syntax [title](link)
for giving your references meaningful
titles:
1link```cpp
2linkvoid func() { // @see [the docs](http://www.cplusplus.com/doc/tutorial/functions/)
3link}
4link```
1linkvoid func() { // @see [the docs](http://www.cplusplus.com/doc/tutorial/functions/)
2link}
warning WARNING
Only the simple
[title](link)
syntax is supported. So the following would not work:
[title](link "tooltip")
[title][reference string]
[title][reference number]
If you have a code snippet inside a Tabs
component, you can also use references
to reference other tabs, with using tab:<tab-title>
(or tab:<tab-id>
for when you
have specified a tab ID) format for your link:
1link> :Tabs
2link> > :Tab title=Main Thing
3link> > ```ts
4link> > import { Stuff } from './other-thing'; // @see tab:Other Thing
5link> > import { MoreStuff } from './other-thing'; // @see [le source](tab:Other Thing)
6link> > ```
7link>
8link> > :Tab title=Other Thing
9link> > ```ts
10link> > export const Stuff = 2;
11link> > export const MoreStuff = 3; // --> bet you expected more from this code sample didn't ya?
12link> > ```
1linkimport { Stuff } from './other-thing'; // @see tab:Other Thing
2linkimport { MoreStuff } from './other-thing'; // @see [le source](tab:Other Thing)
1linkexport const Stuff = 2;
2linkexport const MoreStuff = 3; // --> bet you expected more from this code sample didn't ya?
This feature is currently only supported in languages where one of the following comment syntaxes is valid:
1link// single-line comment
1link/* multi line comment */
1link# comment starting with a hash
1link<!-- HTML style comment -->