Open atnbueno opened 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?
/(< ([^>]+)<)/g
Also: .replace(/^\s\s*/, '').replace(/\s\s*$/, '') does the same as .trim()
.replace(/^\s\s*/, '').replace(/\s\s*$/, '')
.trim()
I just did a PR (see #15) with a fix (assuming HTML tags removing was the original intention)
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()