Skip to content

Markdown viewer: support <br> for explicit line breaks #13732

Open

Description

@fbartho

Pre-submit Checks

Describe the solution you'd like?

Warp's Markdown Viewer should convert raw <br> tags into an actual line break, both standalone mid-paragraph and inside GFM pipe-table cells (the most common place <br> shows up, since pipe-table syntax has no other way to express a multi-line cell).

Expected behavior: <br> produces a real line break wherever it appears, including inside table cells.

Is your feature request related to a problem? Please describe.

Concretely, today in Warp's Markdown Viewer (verified on this build):

Screenshot showing the break element rendering as code

<br> renders as literal text in both positions — standalone mid-paragraph, and inside a GFM pipe-table cell — it is not converted to a line break in either case.

Additional context

Test case:

# `<br>` (standalone and inside a GFM pipe-table cell)

Should render: two lines separated by a real line break where the standalone `<br>` sits, and a table cell with wrapped multi-line content where the `<br>` sits inside a pipe-table cell. Currently: expect `<br>` to render as literal text in both positions — it is not converted to a line break in either the plain-paragraph case or inside GFM table cells.

Standalone, mid-paragraph:

First line of the paragraph.<br>
Second line, after a raw `<br>`.

Inside a GFM pipe-table cell:

| Feature | Notes                          |
| ------- | ------------------------------- |
| Export  | Supports CSV.<br>Also supports JSON. |

Code pointers. As far as I can tell:

  • markdown_parser.rs's InlineToken enum has no LineBreak variant, so <br> isn't recognized anywhere in the .md render path — including inside GFM table cells, which route through the same parse_inline/parse_cell_content machinery as regular paragraph text.
  • There's already reuse precedent for exactly this conversion: the paste-path parser (html_parser.rs) maps <br> → FormattedTextLine::LineBreak when converting pasted HTML. Wiring the same mapping into the .md parser's inline tokenizer looks like the natural approach rather than inventing a new mechanism.
  • CommonMark's own hard-break syntax (trailing double-space or backslash before a newline) also looks unhandled in the inline tokenizer — flagging it here since it's adjacent, though it's not the primary ask of this issue.

Related: this splits out one tag from #13652 (bulk raw-HTML-subset request). Sibling issues from the same split: #13721 (<img> sizing), #13725 (anchor links), #13726 (raw HTML tables), #10259 (<details>/<summary> — pre-existing request), #13733 (<kbd>), #13734 (<sub>/<sup>), #13735 (align on <p>/<div>), #13736 (<picture>/<source>)

Operating system (OS)

macOS

How important is this feature to you?

4

Warp Internal (ignore) - linear-label:39cc6478-1249-4ee7-950b-c428edfeecd1

No response

Activity

  1. added
    enhancement
    on Jul 14, 2026
  2. warp-for-oss commented on Jul 14, 2026

    @warp-for-oss
    Contributor

    @fbartho

    Here's what I found while triaging this issue:

    Thanks — this looks like a real Markdown Viewer feature gap. The provided markdown sample should be enough to reproduce, and the behavior appears parser-level rather than macOS-specific.

    Maintainer details

    I concluded that request to have Warp's Markdown Viewer render raw <br> tags as explicit line breaks in paragraphs and GFM table cells; current markdown inline parsing treats them as literal text..

    Triage summary

    This is an actionable Markdown Viewer enhancement request for raw <br> support as an explicit hard line break in both regular paragraph text and GFM pipe-table cells. The provided markdown sample is sufficient to reproduce the current behavior and routes to area:editor-notebooks.

    Evidence

    • The issue uses the feature request template and provides a minimal markdown sample with both standalone <br> and <br> inside a GFM table cell.
    • crates/markdown_parser/src/markdown_parser.rs parses table cells via parse_cell_content, which delegates to parse_inline, the same inline parser used for paragraph text.
    • parse_inline_token has no raw-HTML <br> token; aside from the special <u> / </u> handling and HTML entity decoding, unmatched punctuation falls through to literal text.
    • FormattedTextLine::LineBreak exists in crates/markdown_parser/src/lib.rs, but it is a block-level formatted line, while table cells currently store Vec<FormattedTextFragment> and are laid out from flattened text runs in crates/editor/src/content/edit.rs.
    • crates/markdown_parser/src/html_parser.rs already maps pasted HTML <br> nodes to FormattedTextLine::LineBreak, which supports the reporter's observation that the markdown-file parser path is the missing path.

    Duplicate check

    I checked all open issues in warpdotdev/warp and recently closed issues. #13652 is a recently closed umbrella raw-HTML request that this issue explicitly split out from, and #13725 / #13726 are sibling requests for different HTML tags, so this does not meet the duplicate threshold.

    Open questions

    None for initial triage. Product/implementation follow-up is whether support should be limited to <br> / <br/> or include adjacent CommonMark hard-break syntax in the same change, but the requested <br> behavior itself is clear.

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

    Powered by Oz

  3. added
    area:editor-notebooks
    repro:high
    triaged
    on Jul 14, 2026
  4. added
    ready-to-implement
    on Jul 15, 2026
  5. removed their assignment
    on Jul 15, 2026
  6. warp-for-oss commented on Jul 15, 2026

    @warp-for-oss
    Contributor

    This issue has been labeled ready-to-implement and is open for contributions involving code changes. If you'd like to tackle it, feel free to open a pull request against this issue. You can also comment @oz-agent on this issue to have the bot draft an implementation PR automatically.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:editor-notebooksenhancementready-to-implementrepro:hightriagedwarp:auto-triage-review

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions