Skip to content
This repository has been archived by the owner on Oct 2, 2021. It is now read-only.

Ignore some regex characters in sourcemap overrides pattern #261

Merged

Conversation

msafi
Copy link

@msafi msafi commented Dec 19, 2017

I'm trying to setup vscode-chrome-debug for our project.

The source map URLs for our projects look like this:

webpack+subproject:///./src/js/actions/accordion.js

So I tried the following

"sourceMapPathOverrides": {
  "webpack+subproject:///./*": "${webRoot}/*"
}

...but that didn't work because the code for the overrides treats the + as part of a regex, which it's not.

I've modified the code in sourceMapUtils.ts to ignore some regex characters in the override URLs. Not sure if that's the right solution, but I hope that at least it illustrates the problem.

(Sorry for mixing in formatting changes there!)

@msftclas
Copy link

msftclas commented Dec 19, 2017

CLA assistant check
All CLA requirements met.

@msafi msafi changed the title Allow some regex in sourcemap overrides pattern Allow some regex characters in sourcemap overrides pattern Dec 19, 2017
@msafi msafi changed the title Allow some regex characters in sourcemap overrides pattern Ignore some regex characters in sourcemap overrides pattern Dec 19, 2017
Copy link
Member

@roblourens roblourens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great! I can probably reduce the number of "escape regex chars" util methods I have, and escaping whitespace doesn't seem necessary, but I will work on that. Thanks for the PR.

@roblourens roblourens merged commit 2e6b525 into microsoft:master Dec 25, 2017
@roblourens roblourens modified the milestone: January 2018 Feb 2, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants