Closed a1156883061 closed 2 years ago
It seems these line cause this miss https://github.com/uctakeoff/vscode-counter/blob/627554d7ce33a3137732574bdf50ce262ea589c4/src/LineCounter.ts#L57-L63
this block comment not start with /*
but {/*
, so index
not equals to 0
So type
was be recognized as code ranther than comment
Thank you for identifying the cause. However, there are still some problems with your idea.
If I fix it, the following code will also become a comment line.
x = 0; /* comment */
Some C writers often write this kind of code.
There is also a way to mark the space between {/*
and */}
as a block comment, but it is not so cool.
Do you have any other ideas?
I think there should be a regex to identify the tsx comment
Like this \{.*\/\*.*\*\/.*\}
That method is a tsx-specific solution. The program needs to work in any language.
@a1156883061 @hyluo1 This has been fixed in ver. 3.0.4. We had no choice but to give it a special treatment after all.
In tsx files, comment in element was not counted.
comment like
{/* Bulletin Board Card*/}
was not recognized to comment.