Fixes #132476 by not colorizing <...> by default.

上级 0b6c2111
......@@ -28,7 +28,13 @@ export class CharacterPairSupport {
if (config.colorizedBracketPairs) {
this._colorizedBracketPairs = config.colorizedBracketPairs.map(b => [b[0], b[1]]);
} else if (config.brackets) {
this._colorizedBracketPairs = config.brackets.map(b => [b[0], b[1]]);
this._colorizedBracketPairs = config.brackets
.map((b) => [b[0], b[1]] as [string, string])
// Many languages set < ... > as bracket pair, even though they also use it as comparison operator.
// This leads to problems when colorizing this bracket, so we exclude it by default.
// Languages can still override this by configuring `colorizedBracketPairs`
// https://github.com/microsoft/vscode/issues/132476
.filter((p) => !(p[0] === '<' && p[1] === '>'));
} else {
this._colorizedBracketPairs = [];
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册