Skip to content

Commit

Permalink
fix(twoslash): nested code block rendering structure
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed May 28, 2024
1 parent ae470d5 commit 5fe8ee6
Show file tree
Hide file tree
Showing 11 changed files with 6,866 additions and 6,177 deletions.
2 changes: 1 addition & 1 deletion docs/components.d.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/* eslint-disable */
/* prettier-ignore */
// @ts-nocheck
// Generated by unplugin-vue-components
// Read more: https://github.com/vuejs/core/pull/3399
export {}

/* prettier-ignore */
declare module 'vue' {
export interface GlobalComponents {
Badges: typeof import('./.vitepress/components/Badges.vue')['default']
Expand Down
2 changes: 1 addition & 1 deletion packages/twoslash/src/renderer-rich.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ export function rendererRich(options: RendererRichOptions = {}): TwoslashRendere
lang: (this.options.lang === 'tsx' || this.options.lang === 'jsx')
? 'tsx'
: 'ts',
structure: 'inline',
structure: content.trim().includes('\n') ? 'classic' : 'inline',
},
).children as ElementContent[],
}
Expand Down
8 changes: 6 additions & 2 deletions packages/twoslash/test/out/completion-end-multifile.ts.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 5fe8ee6

Please sign in to comment.