Skip to content

feat: render markdown tables in sidepanel and skill previews - #2845

Open
snowyukitty wants to merge 1 commit into
webbrain-one:mainfrom
snowyukitty:feat/render-markdown-tables
Open

feat: render markdown tables in sidepanel and skill previews#2845
snowyukitty wants to merge 1 commit into
webbrain-one:mainfrom
snowyukitty:feat/render-markdown-tables

Conversation

@snowyukitty

Copy link
Copy Markdown

Description

This change adds support for rendering GitHub Flavored Markdown (GFM) tables in both the sidepanel chat UI and the skill preview pane across Chrome and Firefox builds (addressing #2838).

Key Highlights

  1. Pure ES Table Renderer (markdown-render.js):

    • Parses GFM tables into accessible semantic HTML (<div class="markdown-table-wrapper"><table>...</table></div>).
    • Supports column alignment (:---, :---:, ---:), single edge pipes, escaped pipes (\|), and GFM delimiter hyphen validation (>= 3).
    • Block boundary protection: correctly terminates tables before post-table lists (both -/*/+ and dot/parenthesized numbered lists 1. / 1)), blockquotes, and ATX headings containing pipes.
  2. Protected Inline Formatting & Collision-Safe Sentinels:

    • Centralizes renderInlineMarkdown to protect sanitized markdown anchors with unique sentinels during emphasis processing, preserving starred URLs and supporting bold/italic both around and inside link text.
    • Generates collision-proof Private Use Area (PUA) sentinels with deterministic collision resolution loop across all extraction families (CODE, INLINE, TABLE, LINK, QUOTE, LIST).
    • Cleans up trailing whitespace-only line breaks.
  3. Parity & Comprehensive Testing:

    • Maintains exact 1:1 parity between Chrome and Firefox extension builds.
    • Added unit tests covering table parsing, column alignment, block boundary isolation, deterministic sentinel collision loops, and end-to-end markdown pipelines.
    • All 1847 unit tests and 60/60 security tests pass cleanly.

Closes #2838

- Implement pure ES GFM table renderer in markdown-render.js supporting column alignment, single edge pipes, delimiter hyphens (>=3), and escaped pipes
- Centralize anchor-protected inline formatting with collision-safe sentinels across all placeholder families
- Support dot and parenthesized ordered list numbers at post-table block boundaries
- Trim trailing whitespace line breaks cleanly
- Maintain byte-for-byte implementation parity across Chrome and Firefox builds
- Add comprehensive test coverage in test/run.js
@vercel

vercel Bot commented Aug 18, 2026

Copy link
Copy Markdown

@snowyukitty is attempting to deploy a commit to the esokullu's projects Team on Vercel.

A member of the Team first needs to authorize it.

@esokullu

Copy link
Copy Markdown
Collaborator

thanks for the contribution @snowyukitty i think it's conflicting with an earlier commit but it can stilll merge into skills block - thanks!

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.

can't render tables

2 participants