Skip to content

fix(ui): render Markdown code without programming ligatures #1431

Closed

Description

@Astro-Han

What happened

Markdown code can render repeated punctuation with Geist Mono programming ligatures instead of preserving the literal glyphs.

For example, a fenced text block containing ### P1 — ... renders the three hash characters as a combined glyph. Its ink and advance extend to the left, making the line appear misaligned relative to neighboring lines such as ## Findings.

Expected behavior: code surfaces render every source character literally and retain consistent code-block alignment.

How to reproduce

  1. Run the Desktop app from the current main branch.

  2. Render an assistant response containing:

    ## Findings
    
    ### P1 — request cancellation may still write state
    
    packages/runtime/src/runner.ts:142
    
  3. Compare the left edge and character spacing of the ## and ### lines.

Environment

  • Maka commit: 0aabde977
  • OS: macOS 26.5.2
  • Surface: Desktop
  • Node.js: v26.5.0

Logs, screenshots, or additional context

The Markdown code surface uses Geist Mono Variable through --font-mono.

apps/desktop/src/renderer/styles/prose.css applies the mono font to .maka-prose code, but does not disable font ligatures. Other literal code/output surfaces already use font-variant-ligatures: none, including .maka-code in maka-tokens.css.

Suggested direction

Disable ligatures at the semantic Markdown code boundary, preferably .maka-prose code, so both inline and fenced code inherit literal character shaping. Avoid a sample-specific offset or a patch scoped only to ###.

Acceptance criteria

  • Markdown inline and fenced code render repeated/operator characters literally, including ###, ===, and =>.
  • Fenced code lines retain consistent left alignment.
  • Non-code prose typography is unchanged.
  • Add a focused regression contract in apps/desktop/src/main/__tests__/markdown-prose-contract.test.ts.

Activity

  1. added
    bug
    good first issue
    on Jul 24, 2026
  2. sunheyi6 commented on Jul 24, 2026

    @sunheyi6
    Contributor

    Claiming this issue.

    PR opened against upstream main: #1454

    • Disable programming ligatures on .maka-prose code (font-variant-ligatures: none) so Markdown inline/fenced code renders ### / === / => literally
    • Regression contract: MARKDOWN-CODE-LITERAL-LIGATURES-0 in markdown-prose-contract.test.ts
  3. added a commit that references this issue on Jul 24, 2026
    cac049c
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

    buggood first issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions