Skip to content

Markdown table columns misalign when cells contain emoji charactersΒ #2764

@bghgary

Description

@bghgary

Description

Markdown tables containing emoji characters (e.g. 🟑, 🟒, βœ…, ❌, ⏳) render with broken column alignment when the terminal window is not wide enough. The columns wrap incorrectly and raw ANSI escape code fragments (e.g. [38 ;2... 80;1 80;1 80ms) leak into the rendered output.

Steps to Reproduce

  1. Have a terminal window at a moderate width (not maximized)
  2. Ask Copilot CLI to produce a markdown table that includes colored emoji in cells, for example:
| Name | Status | Count |
|------|--------|-------|
| Foo  | 🟒 open | 5βœ… 2❌ |
| Bar  | 🟑 draft | 3βœ… 1⏳ |
  1. Observe the rendered table β€” columns are misaligned, text wraps mid-cell, and ANSI escape codes appear as raw text

Expected Behavior

The table should render with correct column alignment regardless of emoji presence. Emoji characters are typically double-width in terminals, but the markdown renderer appears to calculate them as single-width, causing columns to overflow and wrap.

Workaround

  • Widening the terminal window makes the table render correctly
  • Using single-width Unicode symbols (βœ“, βœ—, ●, β—‹) instead of emoji avoids the issue

Environment

  • OS: Windows
  • Terminal: Windows Terminal
  • Copilot CLI version: 1.0.27

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:terminal-renderingDisplay and rendering: flickering, scrolling, line wrapping, output formatting

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions