microsoft / vscode-wordcount

Sample Word Count extension for VS Code.
Other
124 stars 80 forks source link

Not counting HTML tags? #13

Open atnbueno opened 6 years ago

atnbueno commented 6 years ago

Is the /(< ([^>]+)<)/g regex trying to delete HTML tags so they are not counted as words? Or its it doing something else I don't see?

Also: .replace(/^\s\s*/, '').replace(/\s\s*$/, '') does the same as .trim()

atnbueno commented 6 years ago

I just did a PR (see #15) with a fix (assuming HTML tags removing was the original intention)