Add unbalanced bracket scopes for Markdown (#327741)

* fix(markdown): mark embedded C#/TS operator tokens unbalanced and add colorize fixture for #279576

* test: update markdown colorize fixture themes

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Address Markdown TSX colorization feedback

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Guihua Zheng <guihuaz@outlook.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Dmitriy Vasyura
2026-07-28 00:27:14 +00:00
committed by GitHub
co-authored by Copilot Guihua Zheng
parent 60d2f89065
commit 75c2a36fd2
4 changed files with 4721 additions and 1 deletions
+14 -1
View File
@@ -97,7 +97,20 @@
},
"unbalancedBracketScopes": [
"markup.underline.link.markdown",
"punctuation.definition.list.begin.markdown"
"punctuation.definition.list.begin.markdown",
"keyword.operator.relational.cs",
"keyword.operator.arrow.cs",
"punctuation.accessor.pointer.cs",
"keyword.operator.bitwise.shift.cs",
"keyword.operator.assignment.compound.bitwise.cs",
"keyword.operator.relational.ts",
"storage.type.function.arrow.ts",
"keyword.operator.bitwise.shift.ts",
"keyword.operator.assignment.compound.bitwise.ts",
"keyword.operator.relational.tsx",
"storage.type.function.arrow.tsx",
"keyword.operator.bitwise.shift.tsx",
"keyword.operator.assignment.compound.bitwise.tsx"
]
}
],
@@ -0,0 +1,32 @@
```c#
public class A {
public unsafe void F(int i, Data* ptr) {
var a = i > 1;
var b = i >> 1;
var c = i >>= 1;
var d = i >>>= 1;
int G() => i + 1;
int ptrAccess = ptr->field;
}
}
```
```ts
function f(i: number) {
var a = i > 1;
var b = i >> 1;
var c = i >>= 1;
var d = i >>>= 1;
const G = (): number => i + 1;
}
```
```tsx
function Component(i: number) {
var a = i > 1;
var b = i >> 1;
var c = i >>= 1;
var d = i >>>= 1;
const G = (): number => <span>{i + 1}</span>;
}
```
File diff suppressed because it is too large Load Diff