Skip to content

fix(meta-fetcher): strip HTML comments before parsing meta tags (#389) - #390

Merged
anurag629 merged 1 commit into
codercops:devfrom
bhushan4work:389
Nov 3, 2026
Merged

anurag629 merged 1 commit into
codercops:devfrom
bhushan4work:389

Conversation

@bhushan4work

Copy link
Copy Markdown
Collaborator

description

commented-out html tags were being parsed as active metadata because the extraction regexes ran over raw html. strip html comments before parsing to ensure commented-out <title>, <meta>, and <link> tags do not override or interfere with active metadata.

description

closes #389

how i tested this

  • npx vitest run tests/lib/meta-fetcher.test.ts (53 passed)
  • git diff --check (passed)
  • verified that the remote branch matches the local commit.
  • verified the diff against upstream/dev contains only the two intended files.

ai assistance

none

type of change

  • bug fix
  • tests
  • new template
  • new feature
  • documentation
  • refactoring
  • performance improvement
  • other (describe below)

screenshots

not applicable. this is a parser bug fix with no visual changes.

checklist

…rcops#389)

Commented-out tags in HTML were parsed as active metadata because the
extraction regexes ran over raw HTML. Strip comments first so that
commented-out <title>, <meta>, and <link> tags no longer shadow or
overwrite their live counterparts.
@anurag629 anurag629 added the codercops-accepted Merged PR that counts on the monthly leaderboard (oss.codercops.com) label Nov 3, 2026
@anurag629
anurag629 merged commit 2616a34 into codercops:dev Nov 3, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

codercops-accepted Merged PR that counts on the monthly leaderboard (oss.codercops.com)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] fix: parseMetaTags extracts tags inside HTML comments, causing commented-out metadata to override active tags

2 participants