Markdown tables render incorrectly with CJK characters (misaligned columns)
Description
Markdown tables containing mixed CJK (Chinese/Japanese/Korean) and ASCII characters display with misaligned columns in Claude Code on the web. The same tables render correctly when wrapped in code blocks, indicating the monospace renderer works properly but the markdown table parser has issues with CJK character width calculation.
Environment
- Platform: Claude Code on the web
- Browser: Chrome 142.0.7444.60 (arm64)
- OS: macOS
Steps to Reproduce
- Ask Claude to output a markdown table with mixed CJK/ASCII content
- Example table that breaks:
| English Term | Translation |
|--------------|-------------|
| Branch = part | Branch = complete copy |
| Fork = branch | Fork = independent project |
(Note: Replace "Translation" column with actual CJK characters to reproduce the issue)
- Table renders with broken alignment when CJK characters are present
Expected vs Actual Behavior
- Expected: Properly aligned table columns with consistent column separators
- Actual: Column separators don't align, content overflows cell boundaries, making tables unreadable
Workaround
Wrapping the table in triple backticks (\\\`) renders it correctly in monospace font, proving the rendering engine works but the markdown table parser has issues.
Technical Analysis
- Tables are a GFM (GitHub Flavored Markdown) extension, not core CommonMark
- Likely issue with CJK character width calculation (CJK characters typically require 2 monospace widths vs 1 for ASCII)
- The markdown-to-HTML converter appears to miscalculate column widths when mixed character sets are present
- CSS/rendering edge case specific to the web interface
Impact
- Severity: Medium (workaround exists but degrades user experience)
- Frequency: 100% reproducible with CJK content
- User Experience: Forces users to avoid natural table formats for comparison/translation content
- Affected Users: Anyone working with CJK languages (Chinese, Japanese, Korean) or multilingual content
Additional Notes
This issue specifically affects users who need to display bilingual content or translations in table format, which is a common use case for international users or language learning contexts.
Proposed Solution
Consider using a monospace font for markdown tables or implementing proper CJK character width calculation in the table renderer (similar to how terminal emulators handle double-width characters).
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗