Skip to content

Render JSDoc examples as typescript code - #234143

Merged
Matt Bierner (mjbvz) merged 1 commit into
microsoft:mainfrom
ribru17:example_ts_rendering
Nov 22, 2024
Merged

Matt Bierner (mjbvz) merged 1 commit into
microsoft:mainfrom
ribru17:example_ts_rendering

Conversation

@ribru17

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor Author

@microsoft-github-policy-service agree

@mjbvz Matt Bierner (mjbvz) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks!

@mjbvz Matt Bierner (mjbvz) added this to the November 2024 milestone Nov 20, 2024
@mjbvz

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor Author

Oops thanks for lmk! Should be fixed now.

@mjbvz
Matt Bierner (mjbvz) merged commit 3b7e1c6 into microsoft:main Nov 22, 2024
Osvaldo Ortega (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.
@vs-code-engineering vs-code-engineering Bot locked and limited conversation to collaborators Jan 6, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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