Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect commented import is used in completion #76

Open
MMMartt opened this issue Aug 22, 2022 · 1 comment
Open

Incorrect commented import is used in completion #76

MMMartt opened this issue Aug 22, 2022 · 1 comment

Comments

@MMMartt
Copy link

MMMartt commented Aug 22, 2022

If there is a commented import before the correct one, it will be recognized as the expected module:
Screen Shot 2022-08-22 at 13 52 44
If commented one is after the correct one:
Screen Shot 2022-08-22 at 13 53 50
Should be relative to genImportRegExp() in src/utils/path.ts

@iChenLei
Copy link
Collaborator

This extension based on RegExp, so the code is clean and simple, but sometimes you will encount edge cases like this issue, because we don't parse JS/TS file to detect which is comment and which is code. Anyway, PR welcome.

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

No branches or pull requests

2 participants