yyx990803 / launch-editor

Open file in editor from Node.js.
MIT License
585 stars 67 forks source link

Support `file:` protocol #53

Open sapphi-red opened 1 year ago

sapphi-red commented 1 year ago

Currently file protocol (e.g. /__open-in-editor?file=file%3A%2F%2F%2FC%3A%2Ffoo.js:13:24) is not supported.

Because using fileURLToPath in browser requires a polyfill, I think it would be nice if file protocol is supported.

sapphi-red commented 10 months ago

I'm not saying that launch-editor should intercept requests accessing to URLs with file: protocol which is impossible as you say. I'm saying that I want launch-editor to support file URLs to be accepted as the first parameter.

import launch from 'launch-editor'
launch('file:///foo/bar/foo.js:12:34')