Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
gcanti opened this issue Nov 26, 2024 · 0 comments
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@gcanti
Copy link
Contributor

gcanti commented Nov 26, 2024

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.

@gcanti gcanti added documentation Improvements or additions to documentation enhancement New feature or request labels Nov 26, 2024
@gcanti gcanti self-assigned this Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant