diff --git a/src/modules/twoslash.ts b/src/modules/twoslash.ts index 0f9f6b72..edf8f891 100644 --- a/src/modules/twoslash.ts +++ b/src/modules/twoslash.ts @@ -105,7 +105,11 @@ export class TwoslashModule extends Module { linkWithHats += ' '.repeat(spaceBefore); linkWithHats += '^'.repeat(e.length || 0); }); - resultLines.push(linkWithHats); + + if (linkWithHats.length > 0) { + resultLines.push('//' + linkWithHats.substr(2)); + } + resultLines.push(...errors); }