We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ca4da1f commit 8a52f97Copy full SHA for 8a52f97
packages/site-kit/src/lib/markdown/renderer.ts
@@ -680,6 +680,13 @@ async function syntax_highlight({
680
if (check) {
681
// munge the twoslash output so that it renders sensibly. the order of operations
682
// here is important — we need to work backwards, to avoid corrupting the offsets
683
+
684
+ // first, strip out unwanted error lines
685
+ html = html.replace(
686
+ /<div class="twoslash-meta-line twoslash-error-line">[^]+?<\/div>/g,
687
+ '\n'
688
+ );
689
690
const replacements: Array<{ start: number; end: number; content: string }> = [];
691
692
for (const match of html.matchAll(/<div class="twoslash-popup-docs">([^]+?)<\/div>/g)) {
0 commit comments