Skip to content

Refactored comment stripping#32

Merged
EvanK merged 3 commits into
mainfrom
codeql-3
Jun 22, 2026
Merged

Refactored comment stripping#32
EvanK merged 3 commits into
mainfrom
codeql-3

Conversation

@EvanK

@EvanK EvanK commented Jun 21, 2026

Copy link
Copy Markdown
Owner

To address codeql's vague and decidedly unhelpful regex concerns, this instead uses a character by character approach based on this j11y implementation.

Significant changes in comment matching/stripping here will need some additional unit testing coverage:

  • should now also match comments (single or multi line) embedded within string literals
  • for maximum browser compat, should leave IE4+ style conditional comments in place
  • should safely ignore any string resembling a js-style comment
  • should safely ignore any regex resembling a js-style comment

@EvanK EvanK merged commit 8af7b8a into main Jun 22, 2026
8 checks passed
@EvanK EvanK deleted the codeql-3 branch June 22, 2026 03:39
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.

1 participant