wooorm / markdown-tm-language

really good syntax highlighting for markdown and MDX
https://wooorm.com/markdown-tm-language/
MIT License
42 stars 1 forks source link

Upstream TS grammar bug: No semicolon after a `type` leads to embedded TS running amok #5

Open wooorm opened 1 year ago

wooorm commented 1 year ago

Example:

# Dark blue?

```js
type X = 1

Dark blue?

type X = 1

Dark blue?


The bug is tracked at https://github.com/microsoft/TypeScript-TmLanguage/issues/873.
It affects this grammar when used on GH *only* when using ` ```ts `.
It affects this grammar when used in VS code everywhere.

The actual solution is upstream, but tracking it here as users might run into it.
In the mean time, add a semicolon :'(

````md
# Dark blue?

```ts
type X = 1;

Dark blue?