Skip to content

Commit 1b92f7e

Browse files
chore: update tests
1 parent 4b5fb9e commit 1b92f7e

File tree

2 files changed

+60
-0
lines changed

2 files changed

+60
-0
lines changed

examples/app-router/examples/highlight-example.mdx

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,3 +141,33 @@ console.log('Hi! Shiki + Twoslash on CDN :)');
141141
const count = ref(0);
142142
// ^?
143143
```
144+
145+
## Link support
146+
147+
```js Link Testing icon="js" lines mint-twoslash
148+
import { useEffect, useState } from 'react';
149+
150+
// @link Component
151+
export function Component() {
152+
// ^?
153+
return <div>{count}</div>;
154+
}
155+
156+
// @link OtherFunction: #hola-there
157+
export function OtherFunction() {
158+
// ^?
159+
return <div>{count}</div>;
160+
}
161+
162+
// @link ExternalLink: https://google.com
163+
export function ExternalLink() {
164+
// ^?
165+
const str =
166+
"Don't worry, only hover targets with ExternalLink will be affected, not random strings";
167+
return <div>{count}</div>;
168+
}
169+
```
170+
171+
### Component
172+
173+
Hello world from the `Component` section

examples/pages-router/examples/highlight-example.mdx

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,3 +141,33 @@ console.log('Hi! Shiki + Twoslash on CDN :)');
141141
const count = ref(0);
142142
// ^?
143143
```
144+
145+
## Link support
146+
147+
```js Link Testing icon="js" lines mint-twoslash
148+
import { useEffect, useState } from 'react';
149+
150+
// @link Component
151+
export function Component() {
152+
// ^?
153+
return <div>{count}</div>;
154+
}
155+
156+
// @link OtherFunction: #hola-there
157+
export function OtherFunction() {
158+
// ^?
159+
return <div>{count}</div>;
160+
}
161+
162+
// @link ExternalLink: https://google.com
163+
export function ExternalLink() {
164+
// ^?
165+
const str =
166+
"Don't worry, only hover targets with ExternalLink will be affected, not random strings";
167+
return <div>{count}</div>;
168+
}
169+
```
170+
171+
### Component
172+
173+
Hello world from the `Component` section

0 commit comments

Comments
 (0)