Skip to content

fix: support table attrs in readme - #1329

Merged
danielroe merged 1 commit into
npmx-dev:mainfrom
alexdln:fix/support-table-attrs-in-readme
Feb 10, 2026
Merged

fix: support table attrs in readme#1329
danielroe merged 1 commit into
npmx-dev:mainfrom
alexdln:fix/support-table-attrs-in-readme

Conversation

@alexdln

Copy link
Copy Markdown
Member

Added support for two fields that are supported in other systems but not in our: width and valign for th and td.

  • valign is deprecated, but still used
  • Also tested width with different values ​​- it works within the container

Closes#1093 (sorry, I missed this part, checked bunch more popular libraries and hopefully we're close to other apps now)

@vercel

vercelBot commented Feb 10, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

ProjectDeploymentActionsUpdated (UTC)
npmx.devReadyReadyPreview, CommentFeb 10, 2026 11:47am
2 Skipped Deployments
ProjectDeploymentActionsUpdated (UTC)
docs.npmx.devIgnoredIgnoredPreviewFeb 10, 2026 11:47am
npmx-lunariaIgnoredIgnoredFeb 10, 2026 11:47am

Request Review

@codecov

codecovBot commented Feb 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@coderabbitai

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

This PR expands the allowed HTML attributes in the sanitiser configuration for table elements. Specifically, it adds 'valign' and 'width' attributes to both table header (th) and table data (td) elements in the sanitiser configuration within server/utils/readme.ts. This enables README files to preserve table formatting attributes that were previously stripped during sanitisation.

Possibly related PRs

Suggested reviewers

  • danielroe
🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 inconclusive)
Check nameStatusExplanationResolution
Linked Issues check❓ InconclusiveThe PR partially addresses issue #1093 by adding table cell attributes (width, valign), but does not fully resolve the issue's broader objectives regarding centred headings, floating images, and other alignment attributes.Verify whether additional attributes for alignment (align, text-align) and image positioning are required to fully resolve issue #1093, or if this PR represents a phased approach.
✅ Passed checks (2 passed)
Check nameStatusExplanation
Description check✅ PassedThe pull request description accurately describes the changes made: adding support for 'width' and 'valign' attributes for table cells, with relevant context about deprecation and testing.
Out of Scope Changes check✅ PassedThe changes are scoped to the readme sanitiser configuration for table cell attributes only, with no unrelated modifications to other files or functionality.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

No actionable comments were generated in the recent review. 🎉


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

@danielroe
danielroe added this pull request to the merge queueFeb 10, 2026
Merged via the queue into npmx-dev:main with commit f345226Feb 10, 2026
17 checks passed
Sign up for freeto 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.

🐛 Bug: Allowed DOM elements and attributes less permissive than npm

2 participants

@alexdln@danielroe