Skip to content

Add Codemod to Wrap @example Tag Content in a ts Fence for Consistent Rendering #4002

@gcanti

Description

@gcanti

Currently, the @example tag content is not consistently wrapped in a ts fence, which causes rendering issues in some environments, such as in the popovers of Twoslash snippets on the website. While editors like VSCode handle unwrapped @example tags fine, other environments might not render them correctly. To solve this, I propose adding a codemod to ensure all @example tag content is wrapped in a ts fence.

Codemod Behaviour: For each @example tag, check if the content is already wrapped in a ts fence. If not, automatically wrap it in a ts fence.

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentationenhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions