Skip to content

fix(table): render a pipe table inside a blockquote or callout - #95

Merged
delphinus merged 1 commit into
mainfrom
fix/table-in-blockquote
Nov 26, 2026
Merged

delphinus merged 1 commit into
mainfrom
fix/table-in-blockquote

Conversation

@delphinus

Copy link
Copy Markdown
Owner

Summary

A table was found only at the start of a line, so

> | foo | bar |
> |---|---|
> | A | B |

stayed quoted text with its pipes and dashes showing. GFM allows a table in a blockquote (a blockquote holds any block, and the table extension adds one), and GitHub renders one in a callout too.

Rows that start with one quote marker are now collected without it and rendered as a table behind the quote's bar:

│ │ foo │ bar │
│ │─────│─────│
│ │ A   │ B   │
  • The gaps above and below the table keep the bar, so the quote is not cut where the table starts or ends. An empty quote line (>) is the gap itself, and a callout's title needs none.
  • In a callout the bar and background take the callout's colours; the table's own borders stay FloatBorder (apply_alert_styling would have recoloured them, so the bar is coloured by a new add_quote_bar).
  • The callout ends with a table that closes it, as it does after any other line.
  • A nested quote (>> |) is left as quoted text.

Test plan

  • make test, stylua --check .
  • New tests/blockquote_table_test.lua: plain quote, text around the table, empty quote lines as gaps, callout colours, nested quote

🤖 Generated with Claude Code

A table was found only at the start of a line, so `> | a | b |` stayed
quoted text with its pipes and dashes showing. GFM allows a table in a
blockquote, and GitHub renders one in a callout too.

Rows that start with one quote marker are now collected without it and
rendered as a table behind the quote's bar. The gaps above and below
keep the bar, so the quote is not cut where the table starts or ends,
and in a callout the bar and background take the callout's colours
while the table's own borders stay as they are. A nested quote
(`>> |`) is left as quoted text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@delphinus
delphinus merged commit ba4bbcb into main Nov 26, 2026
38 checks passed
@delphinus
delphinus deleted the fix/table-in-blockquote branch November 26, 2026 12:50
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