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

Semicolon added after period in documentation text #11

Closed
STRd6 opened this issue Apr 18, 2022 · 3 comments
Closed

Semicolon added after period in documentation text #11

STRd6 opened this issue Apr 18, 2022 · 3 comments

Comments

@STRd6
Copy link

STRd6 commented Apr 18, 2022

#
###*
.
###
attach = "a"
/**
.;
*/


let attach = "a";

A semicolon is added after the last period in a comment's line of text. This scuffs up the tooltip docs when hovering the documented symbol in another location.

@phil294
Copy link
Owner

phil294 commented Apr 21, 2022

yeah that's unfortunate :/ a workaround is to prefix the . with a #. I'll fix it some day

@phil294
Copy link
Owner

phil294 commented Apr 26, 2022

For even greater nonsense, add a space instead of the dot and hover...

Anyway, I'm not really sure how to fix this. The ; insertion is one of the many transforms to bypass compilation errors while typing. It only gets omitted if any # in a previous position in that line could be found. This is already wacky because a number sign can also appear in different contexts, such as strings. That's just due to the nature of the extension which merely applies regexes.

But this begs the question, why is this an issue after all? When do you type lone dots in comment blocks? I can only think of two cases, the first being textual content

###*
wow, what a great variable.
###
my_var = 1

will show wow, what a great variable.;

and the other one being typos/ syntax errors in JSDoc:

###*
@type {
    x: X.
}
###
x: X

which doesn't change much really

both of which are somewhat forgivable. And if it's really too bad, do

###*
# wow, what a great variable.
###
my_var = 1

So unless I'm missing something, I guess this is a wontfix. Thanks for the report!

@STRd6
Copy link
Author

STRd6 commented Apr 26, 2022

Thanks for the response, I can live with it.

👍

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