Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

121
Views
VSCode extension throws regex indices error only when other extension is enabled

Background

I am working on an extension (vscode-color-blocks) that uses RegExp match indices (new in ES2022). This means I am using a regex string with the d flag to get indices (relational positions) of each capture group in my regex (source):

export const colorBlockRegex = new RegExp(regexString, 'd');

This means that a successful regex match object will have a .indices attribute that I can then use (source):

const match = colorBlockRegex.exec(comment.content);
if (!match) continue;
console.log(match.indices);

Problem

All of this works fine when I am using the extension on it's own and even together with some other extensions. But VSCode behaves like this new regex feature is not available once I install an extension named Todo Tree. At that point my extension crashes and I get the following error:

stack trace: SyntaxError: Invalid flags: d
    at _ (...\.vscode\extensions\gruntfuggly.todo-tree-0.0.215\dist\extension.js:114:74341)
    at Array.<anonymous> (...\.vscode\extensions\gruntfuggly.todo-tree-0.0.215\dist\extension.js:114:3580)
    at Object.parse (...\.vscode\extensions\gruntfuggly.todo-tree-0.0.215\dist\extension.js:114:71938)
    at Object.parse (...\.vscode\extensions\gruntfuggly.todo-tree-0.0.215\dist\extension.js:1:12529)
    at Object.parse (...\.vscode\extensions\gruntfuggly.todo-tree-0.0.215\dist\extension.js:114:415)
    at i (...\.vscode\extensions\gruntfuggly.todo-tree-0.0.215\dist\extension.js:52:165)
    at Array.get [as indices] (...\.vscode\extensions\gruntfuggly.todo-tree-0.0.215\dist\extension.js:52:2895)
    at DecorationRangeHandler.addNewDecorationRanges (...\vscode-color-blocks\dist\extension.js:1735:95)

The stack trace is a little confusing as it steps from gruntfuggly.todo-tree-0.0.215 into my extension vscode-color-blocks.

Otherwise there must be something wrong with how these two extensions are running on different versions on Javascript?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!