Re-enable regex highlight test (#244014)

* Re-enable regex highlight test

* 🤦‍♀️
This commit is contained in:
Alex Ross
2025-03-19 17:21:45 +01:00
committed by GitHub
parent 85138ad719
commit e2eba0acf6
4 changed files with 16 additions and 3 deletions

View File

@@ -70,16 +70,17 @@ suite('colorization', () => {
suiteSetup(async function () {
originalSettingValues = [
workspace.getConfiguration('editor.experimental').get('preferTreeSitter.typescript'),
workspace.getConfiguration('editor.experimental').get('preferTreeSitter.regex'),
workspace.getConfiguration('editor.experimental').get('preferTreeSitter.ini')
];
await workspace.getConfiguration('editor.experimental').update('preferTreeSitter.typescript', true, ConfigurationTarget.Global);
await workspace.getConfiguration('editor.experimental').update('preferTreeSitter.ini', true, ConfigurationTarget.Global);
await workspace.getConfiguration('editor.experimental').update('preferTreeSitter.regex', true, ConfigurationTarget.Global);
await workspace.getConfiguration('editor.experimental').update('preferTreeSitter.ini', true, ConfigurationTarget.Global);
});
suiteTeardown(async function () {
await workspace.getConfiguration('editor.experimental').update('preferTreeSitter.typescript', originalSettingValues[0], ConfigurationTarget.Global);
await workspace.getConfiguration('editor.experimental').update('preferTreeSitter.ini', originalSettingValues[1], ConfigurationTarget.Global);
await workspace.getConfiguration('editor.experimental').update('preferTreeSitter.regex', originalSettingValues[2], ConfigurationTarget.Global);
await workspace.getConfiguration('editor.experimental').update('preferTreeSitter.regex', originalSettingValues[1], ConfigurationTarget.Global);
await workspace.getConfiguration('editor.experimental').update('preferTreeSitter.ini', originalSettingValues[2], ConfigurationTarget.Global);
});
for (const fixture of fs.readdirSync(fixturesPath)) {

View File

@@ -0,0 +1,6 @@
const a = /\\\xFF/;
const b = /[.*+\-?^${}()|[\]\\]/;
const c = /\r\n|\r|\n/;
const d = /\/\/# sourceMappingURL=[^ ]+$/;
const e = /<%=\s*([^\s]+)\s*%>/;
const f = /```suggestion(\u0020*(\r\n|\n))((?<suggestion>[\s\S]*?)(\r\n|\n))?```/;