Skip to content

Commit 55a1768

Browse files
committed
fix(twoslash): fix typo in twoslash-query-persisted, close #1130, close #981
1 parent e6d21b0 commit 55a1768

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

packages/twoslash/src/renderer-rich.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,9 @@ export function rendererRich(options: RendererRichOptions = {}): TwoslashRendere
410410
type: 'element',
411411
tagName: 'span',
412412
properties: {
413-
class: 'twoslash-hover twoslash-query-presisted',
413+
// TODO: `twoslash-query-presisted` was a typo before v3.17. We keep it for backward compatibility.
414+
// We should remove it in the next major version.
415+
class: 'twoslash-hover twoslash-query-persisted twoslash-query-presisted',
414416
},
415417
children: hast?.queryCompose
416418
? hast?.queryCompose({ popup, token: node })

packages/twoslash/style-rich.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,14 @@
6363
box-shadow: var(--twoslash-popup-shadow);
6464
}
6565

66-
.twoslash .twoslash-query-presisted .twoslash-popup-container {
66+
.twoslash .twoslash-query-persisted .twoslash-popup-container {
6767
z-index: 9;
6868
transform: translateY(1.5em);
6969
}
7070

7171
.twoslash .twoslash-hover:hover .twoslash-popup-container,
7272
.twoslash .twoslash-error-hover:hover .twoslash-popup-container,
73-
.twoslash .twoslash-query-presisted .twoslash-popup-container,
73+
.twoslash .twoslash-query-persisted .twoslash-popup-container,
7474
.twoslash .twoslash-query-line .twoslash-popup-container {
7575
opacity: 1;
7676
pointer-events: auto;

packages/vitepress-twoslash/src/style.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
transform: translateY(1.5em);
3535
}
3636

37-
.twoslash-query-presisted .twoslash-popup-container {
37+
.twoslash-query-persisted .twoslash-popup-container {
3838
transform: translateY(1.8em);
3939
}
4040

0 commit comments

Comments
 (0)