Skip to content

Refactor table preprocessor - #43

Merged
mattt merged 3 commits into
mainfrom
mattt/refactor-table-preprocessor
Jul 21, 2026
Merged

Refactor table preprocessor#43
mattt merged 3 commits into
mainfrom
mattt/refactor-table-preprocessor

Conversation

@mattt

@mattt mattt commented Jul 21, 2026

Copy link
Copy Markdown
Member

No description provided.

mattt added 3 commits July 21, 2026 02:17
Keep plain Markdown consumers on the original prose while styling
Supported, Not supported, and None during HTML render.
@mattt
mattt requested a review from Copilot July 21, 2026 09:20
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
sembr-org 02bf54a Jul 21 2026, 09:20 AM

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Refactors how the SemBr specification’s FAQ comparison table is rendered by moving HTML injection from a string preprocessor in the content loader into the unified Remark pipeline, so the stored plain Markdown body remains untouched while rendered HTML gains accessible support indicators.

Changes:

  • Move “Supported / Not supported / None” table-cell rendering into remarkSembr via an AST transform (injecting accessible HTML).
  • Remove preprocessForRendering() from the content loader and render the fetched spec source directly.
  • Update global table/list styling to improve wrapping and align support-indicator styling across <mark> and <em>.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/styles/global.css Adds balanced wrapping for list items and the 2nd table column; updates selectors to style support indicators for both <mark> and <em>.
src/lib/remark-sembr.ts Adds a tableCell visitor that replaces specific support-status text with accessible HTML indicators; renames RFC 2119 constants for clarity.
src/content.config.ts Removes string-based table preprocessing and renders the fetched specification Markdown directly.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mattt
mattt merged commit 53cdcf1 into main Jul 21, 2026
2 checks passed
@mattt
mattt deleted the mattt/refactor-table-preprocessor branch July 21, 2026 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants