markdown-tm-language
markdown-tm-language copied to clipboard
Upstream TS grammar bug: No semicolon after a `type` leads to embedded TS running amok
Example:
# Dark blue?
```js
type X = 1
```
# Dark blue?
```ts
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 :'(
# Dark blue?
```ts
type X = 1;
```
# Dark blue?
note:
this is issue is not present in VSCode
because VSCode's while is a lot more strict than Github's/TextMate's
so embedded languages are unable to break out of the codeblock's while
https://github.com/microsoft/vscode-markdown-tm-grammar
https://github.com/microsoft/vscode-textmate/issues/241