anacierdem / vscode-requirejs

Provides goto definition functionality for require js modules.
MIT License
21 stars 14 forks source link

Using " instead of ' #60

Closed nsergey82 closed 5 years ago

nsergey82 commented 5 years ago

define(['foo'], function(foo)... works like a charm, but define(["foo"], function(foo)... does not. I didn't see any such example in getModulesWithPathFromRequireOrDefine.test.js

Would it be possible to tweak the regexp to match double quote literals (e.g., val.replace(/["'\s\t\r\n\[\]]/gm, '') or do you believe that "strings" shall not be used?

anacierdem commented 5 years ago

Using "strings" is completely legit. This is one of the shortcomings of the current case-by-case extension development without using a proper lexer. Feel free to add a test and send a PR!

nsergey82 commented 5 years ago

Fixed by https://github.com/anacierdem/vscode-requirejs/pull/61