Skip to content

Add three small capabilities to notebook markdown rendering: blockquotes, table cell padding axis, list position awareness #10574

Closed

Description

@aleksandr-bogdanov

What is missing today

Three things do not work in notebook markdown rendering.

  1. Markdown blockquotes (> some text) render with the literal > character visible. There is no left bar, no indent, no background fill. Most editors that render markdown give blockquotes some treatment, including IntelliJ, Obsidian, GitHub, and VS Code.

  2. Tables use a single value for cell padding on both axes. Roomier columns plus tighter rows is a common editorial-table look that today's code cannot express. HTML and CSS have done axis-split padding (padding: 6px 13px) since forever.

  3. Lists use a single margin value for two different things: the gap between items inside the list, and the gap between the list and surrounding paragraphs. Tightening the inter-item gap also tightens the outer gap, and vice versa.

The three are infrastructure gaps. They block theme contributions, future typography work, and contributor PRs that want to improve the markdown experience.

Proposal

Three additive changes that do not affect existing rendering for any user. Defaults are either theme-derived or set to the same values as before.

Blockquote support

Add a Blockquote variant to the markdown parser, the buffer model, and the rendered block list. Add a small render element that paints a left bar, an optional background fill, and delegates the inner text to the normal paragraph code path. Multi-line blockquotes such as GitHub callouts (> [!NOTE]\n> body) render under one continuous bar. Two new fields on RichTextStyles carry the colors: blockquote_background and blockquote_bar_color. Defaults read from theme.surface_3() and theme.outline(), so each theme picks its own.

Table cell padding axis split

Add a cell_padding_y field next to the existing cell_padding on TableStyle, TableConfig, and MarkdownTableAppearance. Existing cell_padding becomes the horizontal axis. The handful of vertical-axis usages (cell_content_start_y, min_height, cell_height) switch to cell_padding_y. Default value matches cell_padding, so existing rendering is byte-identical unless a theme or contributor sets the two differently.

Per-list-item position awareness

User effect: about 2px more breathing room below lists. Inter-item spacing stays tight.

Implementation: a small enum (NotInList, First, Middle, Last, Solo) that describes where each list item sits in its run. Computed in a quick pre-pass before the parallel layout phase by checking the previous and next neighbors. The layout function applies two new constants (LIST_OUTER_MARGIN_TOP=4 and LIST_OUTER_MARGIN_BOTTOM=6) only at first and last positions.

Tests

New unit tests for the parser blockquote variant (including inline formatting and the case where a > mid-line is not a blockquote), for the per-header-spacing dispatch, and for the blockquote spacing tier.

One existing layout regression test (test_undo_at_block_boundary) needs its expected pixel values updated by a few px to track the new list-outer-margin behavior. The update is in the working branch.

A separate test infrastructure issue is worth flagging. Running the full cargo test -p warp_editor --lib cascades seven other render::tests into "Once previously poisoned" panics because test_convert_first_line calls env_logger::init and the logger has already been initialized by some earlier test in another module. This affects master too. Tests pass cleanly when filtered to render::tests:: or run in isolation. Out of scope for this work.

Splittable

The three changes share the same shape (additive capability without behavior change) and were developed together. Glad to split into three PRs (blockquote, cell padding, list position) if that's easier for review.

Reference implementation

Working branch on a fork:
https://github.com/aleksandr-bogdanov/warp/tree/feat/markdown-intellij-styling

The relevant upstream-candidate commits on that branch are:

  • 4715372f feat(editor): add markdown rendering capabilities (blockquote, table cell padding axis, list position awareness) - the architectural changes described above, with theme-derived defaults
  • 52bd06cf fix(editor): support multi-paragraph blockquotes (don't crash on > a\n> b) - the multi-paragraph blockquote handling
  • f1346674 test(render): update test_undo_at_block_boundary expectations for new list outer margin - the test-expectation update

Note for reviewers: the branch HEAD also carries personal taste tweaks layered on top of the upstream-candidate commits (light-mode color hardcodes, IDEA-style spacing values, font preferences). Those are not part of what this issue proposes. Looking at the three commits above shows the upstream-candidate scope cleanly. Happy to push a separate track1-upstream-candidate branch with just those commits if that helps review.

Happy to follow the spec process once this gets the ready-to-spec label.

Activity

  1. warp-for-oss commented on May 9, 2026

    @warp-for-oss
    Contributor

    @aleksandr-bogdanov

    Here's what I found while triaging this issue:

    This is a well-specified enhancement request for notebook markdown rendering. I confirmed it matches current capability gaps rather than a reporter-specific environment issue, and I did not find enough matching open issues to mark it as a duplicate.

    Maintainer details

    I concluded that well-scoped notebook markdown rendering enhancement covering blockquotes, table padding axes, and list outer spacing awareness..

    Triage summary

    This is an enhancement request for the notebook/editor markdown rendering stack. The report is specific and maps cleanly to current code gaps:

    • Blockquotes: FormattedTextLine / BufferBlockStyle / BlockItem do not currently include a blockquote representation, and parse_markdown_internal falls through unsupported > lines to paragraph parsing.
    • Table padding: MarkdownTableAppearance, TableStyle, and TableBlockConfig expose a single cell_padding; table layout, cell origins, text bounds, and row heights all reuse that value for both axes.
    • List spacing: list margins are currently selected from BlockSpacings::from_block_style by block style and indent level only. The layout task only passes broad edit-range BlockLocation, not per-list-run position, so first/middle/last/solo list item spacing cannot be expressed.

    Reproducibility is high because these are deterministic renderer/model capability gaps, not OS-, account-, or backend-sensitive behavior. The proposed reference implementation should still be reviewed carefully because it touches parser output, buffer block styles, render block variants, layout, theme-derived styles, table hit-testing/selection geometry, and notebook style construction.

    Duplicate scan: I checked open issues repository-wide. Related issues include broader markdown/typography requests such as #10575 and #9024, but I did not find two existing open issues that match this exact three-part infrastructure proposal, so this should not be marked duplicate.

    This is my automated analysis and may be incorrect. A maintainer will verify the details.

    Powered by Oz

  2. added
    area:editor-notebooks
    enhancement
    repro:high
    triaged
    on May 9, 2026
  3. aleksandr-bogdanov commented on May 9, 2026

    @aleksandr-bogdanov
    Author

    Visual proof of the three capabilities. In each Warp pair: stock Warp on the left, prototype on the right. Zed shots are for reference ➿

    1. The blockquote pair shows the literal > rendering vs. left-bar + bg + multi-line callout under one continuous bar.
    Image Image
    1. The code blocks + tables pair shows the cell-padding axis split (looser horizontal, tighter vertical) and the lighter code block background.
    Image Image
    1. The lists pair shows the new outer-margin behaviour with tight inter-item spacing.
    Image
  4. aleksandr-bogdanov commented on May 19, 2026

    @aleksandr-bogdanov
    Author

    @oss-maintainers, can this get a readiness pass? Happy to follow up with the spec PR once it's labeled ready-to-spec.

  5. kevinyang372 commented on Jul 21, 2026

    @kevinyang372
    Member

    @aleksandr-bogdanov These are three different tickets -- could you open one for each one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:editor-notebooksenhancementrepro:hightriagedwarp:auto-triage-review

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions