CLI renders excess vertical spacing inside markdown paragraphs / code blocks

Resolved 💬 3 comments Opened Apr 28, 2026 by jkleiner1 Closed May 2, 2026

Summary

A user reported that long markdown content rendered in the Claude Code CLI shows excess vertical spacing inside what should be single paragraphs. Specifically, paragraphs and code-fence contents that contain hard line breaks (single \n between text lines) appear visually as double-spaced or with extra blank lines between every line.

Environment

  • Claude Code CLI (current as of 2026-04-28)
  • macOS Darwin 24.5.0, zsh
  • Terminal renderer: standard

Repro (approximate)

Have the model output a long-form response with code blocks containing soft-wrapped prose, e.g.

\\\
Spirited launched April 28, 2026 in Food & Drink. It is a cocktail
recipe app built around a simple wedge: your bar already holds great
drinks, you just don't know what they are.
\
\\

Expected: prose lines render contiguously with normal single line height inside the code fence.

Observed (per user): the rendered output appears with extra vertical space between every line, making the content look double-spaced and harder to read.

Hypothesis

Possibly the CLI's markdown renderer is treating single \\\n\ inside code fences as paragraph breaks, or inserting extra leading/trailing whitespace per line. Could also be CommonMark hard-break handling (\ \\n\) being applied where it shouldn't.

Notes

  • Filing on behalf of an end user who flagged it during a long-form session.
  • I do not have a screenshot in this filing; happy to follow up with one if useful.
  • Workaround for now: avoid hard-wrapping prose inside code fences; let the renderer wrap naturally.

Impact

Readability suffers in long-form responses, especially when the user wants to copy-paste prose blocks (e.g. content destined for forms or other systems).

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗