Skip to content

Markdown viewer: support <kbd> keyboard-shortcut styling #13733

Open

Description

@fbartho

Pre-submit Checks

Describe the solution you'd like?

Warp's Markdown Viewer should render <kbd> tags with a small, monospace, keycap-styled badge — the standard treatment GitHub and most other renderers give it for documenting keyboard shortcuts.

Expected behavior: each <kbd>…</kbd> renders as a small keycap-styled badge (typically monospace font, subtle border/background, slightly raised appearance).

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

<kbd> is the conventional way to document keyboard shortcuts in Markdown docs (there's no markdown-native equivalent), and it feels especially on-brand for a terminal app's own docs and READMEs to render it properly.

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

Screenshot shows the kbd element rendering as raw code

The raw <kbd> tags and their shortcut text render as plain literal text, with no keycap styling.

Additional context

Test case:

# `<kbd>`

Should render: a small, monospace, keycap-styled badge for a keyboard shortcut. Currently: expect the raw tags and shortcut text to render as plain literal text, with no keycap styling.

Press <kbd>Cmd</kbd>+<kbd>K</kbd> to open the command palette.

Code pointers. As far as I can tell, <kbd> has no functional handling anywhere in the workspace — the tag doesn't appear in markdown_parser.rs, and it's absent from html_parser.rs's PHRASING_ELEMENT_TAGS/TOP_LEVEL_ELEMENT_TAGS_TO_SKIP lists (the ~80 <kbd> string matches elsewhere in the codebase, in crates/warpui_core/src/platform/keyboard.rs, are unrelated doc-comment prose about physical keyboard handling, not markdown rendering).

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>), #13734 (<sub>/<sup>), #13735 (align on <p>/<div>), #13736 (<picture>/<source>)

Operating system (OS)

macOS

How important is this feature to you?

1 (Not too important)

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:

    The report matches the current Markdown Viewer behavior: <kbd> is not currently rendered as a supported inline HTML/keycap element. This looks like a focused Markdown rendering enhancement rather than an OS-specific issue.

    Maintainer details

    I concluded that request to render Markdown Viewer <kbd> HTML tags as styled keycap badges instead of literal text..

    Triage summary

    This is an actionable Markdown Viewer enhancement request. The desired behavior is for inline <kbd>…</kbd> HTML in rendered Markdown to display as keycap-style keyboard shortcut badges rather than as literal tag text.

    Evidence

    • The issue provides a minimal Markdown test case: Press <kbd>Cmd</kbd>+<kbd>K</kbd> to open the command palette.
    • Markdown file rendering flows through app/src/notebooks/file/mod.rs into RichTextEditorView::reset_with_markdown, then through crates/editor/src/content/buffer.rs into parse_markdown or parse_markdown_with_gfm_tables.
    • The inline markdown parser in crates/markdown_parser/src/markdown_parser.rs does not have raw HTML inline tag parsing, so <kbd> is currently treated as literal text.
    • The rich text style model in crates/markdown_parser/src/lib.rs and crates/editor/src/content/text.rs has styles for inline code, links, emphasis, underline, and strikethrough, but not a distinct keycap/kbd style.
    • The separate HTML parser in crates/markdown_parser/src/html_parser.rs is primarily used for pasted HTML and has a limited phrasing-element allowlist; it also does not include kbd.

    Likely implementation area

    A fix likely needs both parser support for recognizing <kbd> as supported inline HTML in Markdown and rendering/model support for a keycap-style inline fragment. If product/design prefers reusing existing inline-code styling as an approximation, that could keep the implementation narrower, but it would not provide the distinct keycap treatment requested.

    Duplicate check

    I found related Markdown Viewer raw-HTML issues, including recently closed #13652 and sibling open issues for other tags, but fewer than two existing issues appear to be likely duplicates of this specific <kbd>/keycap request.

    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 17, 2026
  5. warp-for-oss commented on Jul 17, 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.

  6. removed their assignment
    on Jul 17, 2026
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