Skip to content

Conversation

@LuisUrrutia
Copy link

@LuisUrrutia LuisUrrutia commented Dec 16, 2025

Summary

Fixes #143
Closes semantic-release/github#1133

  • Fix issue references being detected inside HTML comments (<!-- -->)
  • HTML comments are now filtered out before parsing, similar to code blocks

Solution

Added HTML_COMMENT_REGEXP to strip HTML comments from text before parsing, consistent with existing handling for:

  • Fenced code blocks (```)
  • Inline code (`)
  • <code> tags

Comments are replaced with a space (not removed entirely) to preserve word boundaries between adjacent text.

Changes

  • index.js: Added HTML_COMMENT_REGEXP and filtering step
  • index.js: Renamed noCodeBlockfilteredText for clarity
  • test/index.test.js: Added tests for HTML comment exclusion

Copy link
Member

@babblebey babblebey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This Looks great, thanks @LuisUrrutia

@babblebey babblebey requested a review from travi December 17, 2025 10:11
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

Successfully merging this pull request may close these issues.

Does not ignore issue references inside commented content Incorrectly parses commented PR template references

2 participants