Skip to content

fix(runtime-tags): allow content= on a void tag that declares the attribute - #3673

Merged
DylanPiercey merged 1 commit into
mainfrom
dpiercey-ws-marko-website-3w77hx
Jul 28, 2026
Merged

fix(runtime-tags): allow content= on a void tag that declares the attribute#3673
DylanPiercey merged 1 commit into
mainfrom
dpiercey-ws-marko-website-3w77hx

Conversation

@DylanPiercey

Copy link
Copy Markdown
Contributor

The void-tag guard added for <input content=x> rejects content= on every openTagOnly tag, but content is a real html attribute on <meta><meta property="og:image:width" content="1200"> compiled correctly through 6.3.26 and stopped compiling in 6.3.27. That breaks any page carrying og or twitter meta tags; markojs.com itself no longer builds.

marko-html.json already draws the distinction: <meta> declares @content, while <input>, <link>, <br> and <area> do not. The guard now fires only when the tag definition declares no content attribute, so the unrenderable cases the original change targeted still error with the same message.

Verified that static and dynamic <meta content=> both survive: html output emits the attribute, and dom output sets it through _attr rather than dropping it. New content-attr-meta fixture covers both plus a client update.

…ttribute

The void-tag guard added for `<input content=x>` rejected every
`openTagOnly` tag, but `content` is a real html attribute on `<meta>` and
compiled correctly before — so any page carrying og or twitter meta tags
stopped compiling.

The guard now fires only when the tag definition does not declare a
`content` attribute, which still covers `<input>`, `<link>`, `<br>` and
`<area>`. Static and dynamic `<meta content=>` are covered by a fixture.
@changeset-bot

changeset-bot Bot commented Jul 28, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 232f0f8

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@marko/runtime-tags Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 29 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 452d3a04-8f40-4e4a-b080-4d9a893e8a93

📥 Commits

Reviewing files that changed from the base of the PR and between bd51e62 and 232f0f8.

⛔ Files ignored due to path filters (8)
  • packages/runtime-tags/src/__tests__/fixtures/content-attr-meta/__snapshots__/dom.bundle.debug.js is excluded by !**/__snapshots__/** and included by **
  • packages/runtime-tags/src/__tests__/fixtures/content-attr-meta/__snapshots__/dom.bundle.js is excluded by !**/__snapshots__/** and included by **
  • packages/runtime-tags/src/__tests__/fixtures/content-attr-meta/__snapshots__/html.bundle.debug.js is excluded by !**/__snapshots__/** and included by **
  • packages/runtime-tags/src/__tests__/fixtures/content-attr-meta/__snapshots__/html.bundle.js is excluded by !**/__snapshots__/** and included by **
  • packages/runtime-tags/src/__tests__/fixtures/content-attr-meta/__snapshots__/render.debug.md is excluded by !**/__snapshots__/** and included by **
  • packages/runtime-tags/src/__tests__/fixtures/content-attr-meta/__snapshots__/render.md is excluded by !**/__snapshots__/** and included by **
  • packages/runtime-tags/src/__tests__/fixtures/content-attr-meta/__snapshots__/writes.debug.html is excluded by !**/__snapshots__/** and included by **
  • packages/runtime-tags/src/__tests__/fixtures/content-attr-meta/__snapshots__/writes.html is excluded by !**/__snapshots__/** and included by **
📒 Files selected for processing (5)
  • .changeset/meta-content-attribute.md
  • packages/runtime-tags/src/__tests__/fixtures/content-attr-meta/sizes.json
  • packages/runtime-tags/src/__tests__/fixtures/content-attr-meta/template.marko
  • packages/runtime-tags/src/__tests__/fixtures/content-attr-meta/test.ts
  • packages/runtime-tags/src/translator/visitors/tag/native-tag.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dpiercey-ws-marko-website-3w77hx

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Jul 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.32%. Comparing base (bd51e62) to head (232f0f8).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3673   +/-   ##
=======================================
  Coverage   90.32%   90.32%           
=======================================
  Files         412      412           
  Lines       19574    19575    +1     
  Branches     3545     3545           
=======================================
+ Hits        17680    17681    +1     
  Misses       1370     1370           
  Partials      524      524           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@DylanPiercey
DylanPiercey merged commit 8aa1b85 into main Jul 28, 2026
11 checks passed
@DylanPiercey
DylanPiercey deleted the dpiercey-ws-marko-website-3w77hx branch July 28, 2026 17:11
@github-actions github-actions Bot mentioned this pull request Jul 28, 2026
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