vscode-tmlanguage
vscode-tmlanguage copied to clipboard
[Bug] Unpaired braces in match regex should be ignored
When writing JSON grammars, the "match", "begin", and "end" regex fields do not ignore open and unmatched braces within the regex, and those braces bleed out of the JSON value.
This creates misleading syntax highlighting.
Example 1
{
"repository": {
"x1": {
"match": "\\[",
"begin": "\\[",
"end": "\\["
},
"x2": {
"match": "\\]",
"begin": "\\]",
"end": "\\]"
},
"y1": {
"match": "\\}",
"begin": "\\}",
"end": "\\}"
},
"y2": {
"match": "\\{",
"begin": "\\{",
"end": "\\{"
}
}
}
- Expected behavior: When inside of a regex area,
\\[,\\],\\{,//}does not contribute to brace matching - Actual beharior: VSCode attempts to match the braces inside
\\[,\\],\\{,\\}with other braces in the JSON text