Repository navigation
Description
Pre-submit Checks
- I have searched Warp feature requests and there are no duplicates
- I have searched Warp docs and my feature is not there
Describe the solution you'd like?
Warp's Markdown Viewer should honor the align attribute on <p> and <div> blocks — center, but also right and left. Centering is the standard way READMEs build a "hero" header (logo, title, badges), since markdown itself has no alignment syntax outside table columns. Right-alignment matters too: GitHub renders the popular pattern of anchoring a project image to the right edge of the README so it sits interleaved alongside the opening prose (via align="right" — on a wrapping block, or on the <img> itself, which the <img> sizing sibling issue covers).
Expected behavior: content inside a <div align="…"> or <p align="…"> block renders horizontally aligned per the attribute (center/right/left), with nested markdown continuing to render normally (as it already does today). (Minor fidelity note: GitHub's own rendering has a known quirk where <div align="center"> can break inline flow while <p align="center"> doesn't — matching the common-case behavior matters more than replicating that quirk.)
Is your feature request related to a problem? Please describe.
Centered header blocks at the top of a README (logo + title + badge row, often wrapped in a single <div align="center">) are extremely common, and Warp currently renders them left-aligned with the alignment attribute silently dropped.
Concretely, today in Warp's Markdown Viewer (verified on this build):
Both the <div align="center"> and <p align="center"> blocks render left-aligned, with align ignored entirely. The nested markdown heading inside the <div> still renders as a real heading (left-aligned), and the nested <img> inside it renders as literal text — consistent with <img> being unsupported on its own (tracked separately).
Additional context
Test case:
# Centered blocks (`<p align="center">` / `<div align="center">`)
Should render: a centered heading-style line and a centered image, both horizontally centered in the pane. Currently: expect both blocks to render left-aligned as plain literal text/markdown, with the `align` attribute ignored.
<div align="center">
# Centered Title
<img src="https://placehold.co/300x150/png" alt="Centered image">
</div>
<p align="center">A centered caption line.</p>Code pointers. As far as I can tell:
markdown_parser.rshas nodiv/p/centermatching at all.- The paste path doesn't preserve the attribute either:
divis inTOP_LEVEL_ELEMENT_TAGS_TO_SKIP(crates/markdown_parser/src/html_parser.rs, unwrapped, attributes discarded), andpfalls to the generic catch-all arm —align=is never read in either case. - There's no alignment concept in
FormattedTextStyles, so this needs a content-model addition, similar in shape to the existingTableAlignmentfield (used only for GFM table columns today) — that's the closest in-repo precedent for "alignment as part of the content model" I could find, alongside the generic (but currently unwired-to-markdown)crates/warpui_core/src/elements/gui/align.rswidget primitive.
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), #13732 (<br>), #13733 (<kbd>), #13734 (<sub>/<sup>), #13736 (<picture>/<source>)
Operating system (OS)
macOS
How important is this feature to you?
2
Warp Internal (ignore) - linear-label:39cc6478-1249-4ee7-950b-c428edfeecd1
No response
Activity
warp-for-oss commentedon Jul 14, 2026
@fbartho
Here's what I found while triaging this issue:
This looks like a valid Markdown Viewer feature gap. The provided test case is enough to route the request; no additional reporter details are needed for initial triage.
Maintainer details
I concluded that feature request for Markdown Viewer to honor block-level
alignon raw HTML<p>/<div>blocks; current parsing/rendering paths do not preserve paragraph or div alignment..Triage summary
This is a well-scoped Markdown Viewer enhancement request. The requested behavior is to preserve
align="left|center|right"on raw HTML<p>and<div>blocks and render the contained content with the corresponding horizontal alignment.Reproducibility
High. The issue includes a minimal Markdown fixture, and code inspection shows the current parser/rendering pipeline does not carry block-level alignment for paragraphs or divs.
Likely implementation area
crates/markdown_parser/src/markdown_parser.rsparses Markdown lines and currently has no block-level raw HTML support for<p>or<div align=...>.crates/markdown_parser/src/html_parser.rsunwrapsdivviaTOP_LEVEL_ELEMENT_TAGS_TO_SKIPand parsespthrough the generic fallback without readingalign.crates/markdown_parser/src/lib.rsdefinesFormattedTextStylesand table alignment, but no paragraph/div alignment metadata.crates/editor/src/content/text.rsdefinesBufferBlockStyle; only table blocks carry alignment today.crates/editor/src/render/model/mod.rsapplies alignment offsets for table cells only.Duplicate check
No duplicate label recommended. The closest related issues are #13652, a broad recently closed raw-HTML subset request that this issue intentionally splits out from, and #13721, a sibling request for
<img>attributes. Neither provides two existing exact duplicate reports for block-level<p>/<div>alignment.Follow-up
No reporter follow-up is needed for initial routing.
This is my automated analysis and may be incorrect. A maintainer will verify the details.
Powered by Oz
warp-for-oss commentedon Jul 17, 2026
This issue has been labeled
ready-to-specand is open for contributions in the form of a product or technical spec. If you'd like to draft one, feel free to open a pull request with the spec underspecs/. You can also comment@oz-agenton this issue to have the bot draft the spec automatically.Ship markdown block alignment enabled, without a feature flag (warpdo…