···3737 // Only match tags that start with a letter or / (to avoid matching things like "a < b > c")
3838 stripped = stripped.replace(/<\/?[a-z][^>]*>/gi, '')
39394040+ // Strip HTML comments: <!-- ... --> (including unclosed comments from truncation)
4141+ stripped = stripped.replace(/<!--[\s\S]*?(-->|$)/g, '')
4242+4043 if (packageName) {
4144 // Trim first to handle leading/trailing whitespace from stripped HTML
4245 stripped = stripped.trim()