Skip to content
This repository has been archived by the owner on Jan 21, 2024. It is now read-only.

Electron Regex Fix #74

Open
McPo opened this issue Nov 11, 2016 · 1 comment
Open

Electron Regex Fix #74

McPo opened this issue Nov 11, 2016 · 1 comment

Comments

@McPo
Copy link

McPo commented Nov 11, 2016

Hi, the current regex for chrome is

/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|webpack|eval).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i

However Ive noticed in Electron apps at least, theres no guarantee of a file:// prefix. ie Filenames for me are listed as.

/User/Emmet/......

as opposed to

file://User/Emmet/......

Ive changed the regex to

/^\s*at (.*?) ?\(((?:file|https?|\s*|blob|chrome-extension|native|webpack|eval).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i

And now Tracekit is working within Electron.

If any more information is required, let me know.

Thanks,
Emmet

@niemyjski
Copy link
Collaborator

Hey, could you please submit a pr with an added unit test for this scenario. That would be a huge help

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants