Useless regular-expression character escape (#286069)

This commit is contained in:
Martin Aeschlimann
2026-01-06 09:45:55 +01:00
committed by GitHub
parent 4ed90f790d
commit 7f374a7aba

View File

@@ -9,7 +9,7 @@ var updateGrammar = require('vscode-grammar-updater');
function adaptJSON(grammar, name, replacementScope, replaceeScope = 'json') {
grammar.name = name;
grammar.scopeName = `source${replacementScope}`;
const regex = new RegExp(`\.${replaceeScope}`, 'g');
const regex = new RegExp(`\\.${replaceeScope}`, 'g');
var fixScopeNames = function (rule) {
if (typeof rule.name === 'string') {
rule.name = rule.name.replace(regex, replacementScope);