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

Render JSDoc examples as typescript code #234143

Merged
merged 1 commit into from
Nov 22, 2024

Conversation

ribru17
Copy link
Contributor

@ribru17 ribru17 commented Nov 18, 2024

Currently @example produces Markdown code blocks for code examples, but they are not annotated with a programming language. This commit annotates those code blocks as typescript, allowing for better highlighting for JS/TS when using Markdown renderers that recognize these languages.

See this related PR: typescript-language-server/typescript-language-server#918

Fixes #234142

@ribru17
Copy link
Contributor Author

ribru17 commented Nov 18, 2024

@microsoft-github-policy-service agree

mjbvz
mjbvz previously approved these changes Nov 20, 2024
Copy link
Collaborator

@mjbvz mjbvz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@mjbvz mjbvz added this to the November 2024 milestone Nov 20, 2024
joyceerhl
joyceerhl previously approved these changes Nov 20, 2024
rzhao271
rzhao271 previously approved these changes Nov 20, 2024
@mjbvz
Copy link
Collaborator

mjbvz commented Nov 22, 2024

Currently `@example` produces Markdown code blocks for code examples,
but they are not annotated with a programming language. This commit
annotates those code blocks as `typescript`, allowing for better
highlighting for JS/TS when using Markdown renderers that recognize
these languages.
@ribru17
Copy link
Contributor Author

ribru17 commented Nov 22, 2024

Oops thanks for lmk! Should be fixed now.

@mjbvz mjbvz merged commit 3b7e1c6 into microsoft:main Nov 22, 2024
7 checks passed
osortega pushed a commit that referenced this pull request Nov 26, 2024
Currently `@example` produces Markdown code blocks for code examples,
but they are not annotated with a programming language. This commit
annotates those code blocks as `typescript`, allowing for better
highlighting for JS/TS when using Markdown renderers that recognize
these languages.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Annotate @example code blocks as typescript for better highlights
5 participants