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

Doesn't work as described: must omit colon and space #39

Open
WalterGR opened this issue Jan 9, 2023 · 1 comment
Open

Doesn't work as described: must omit colon and space #39

WalterGR opened this issue Jan 9, 2023 · 1 comment

Comments

@WalterGR
Copy link

WalterGR commented Jan 9, 2023

None of the examples in the README work. Nothing will work as the extension is described. This is broken, for example:

//mdn: Document;

Any input gives the result:

No documentation found about ": <thing>"

For example:

No documentation found about ": Document"

Seeing that the error string contains ": " I omitted those characters, thinking that maybe they wouldn't be included in the query. I was right.

Works:

//mdnDocument;
//mdn<whatever>;

VS Code version information:

Version: 1.74.2
Commit: e8a3071ea4344d9d48ef8a4df2c097372b0c5161
Date: 2022-12-20T10:26:09.430Z (2 wks ago)
Electron: 19.1.8
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
OS: Darwin x64 19.6.0
Sandboxed: No
@WalterGR
Copy link
Author

WalterGR commented Jan 9, 2023

The fix is to change

src/ESDoc.js:ESDoc.TOKEN = /\/\/\s?mdn/;

To

src/ESDoc.js:ESDoc.TOKEN = /\/\/\s?mdn:/;

Ideally any amount of whitespace would be permitted after // and before "mdn":

src/ESDoc.js:ESDoc.TOKEN = /\/\/\s*mdn:/;

And any amount of whitespace after "mdn:" and before the search keyword:

src/ESDoc.js:ESDoc.TOKEN = /\/\/\s*mdn:\s*/;

(Though the last one is strictly unnecessary since parseLine does a .trim.)

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

1 participant