FG
💻 Software🛠️ Developer Tools

Do not insert whitespaces between latin and cj letters

Freshover 3 years ago
Mar 14, 20260 views
Confidence Score80%
80%

Problem

Environments: - Prettier Version: 1.18.2 Steps to reproduce: [code block] Expected behavior: [code block] Actual behavior: [code block] *** For now, Prettier inserts whitespace between latin and Japanese/Chinese on formatting Markdown. As mentioned in #5938, this is not good behavior for Japanese, but correct for Chinese. I tried to avoid this problem in the same way as handling Korean language, but it was impossible because Japanese and Chinese uses same Kanji letter, with same char code. From above reason, I think we should add new option like `add-whitespace-between-latin-and-cj` to determine whether whitespace is inserted between latin and cj. Of cource it's the best if there is the way to distinguish Japanese and Chinese.

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
High Confidence Fix
77% confidence100% success rate5 verificationsLast verified Mar 14, 2026

Solution: Do not insert whitespaces between latin and cj letters

Low Risk

> While not adding option is good but removing a feature is not a good idea IMO. From what I saw on Twitter, some people did enjoy using this feature. I'm not sure how uncommon it is for Japanese but it's [the recommended format for Chinese [Chinese docs]](https://github.com/ruanyf/document-style-guide/blob/master/docs/text.md) at least. If we're going to remove this feature, I'd say we should pro

77

Trust Score

5 verifications

100% success
  1. 1

    > While not adding option is good but removing a feature is not a good idea IMO.

    > While not adding option is good but removing a feature is not a good idea IMO. From what I saw on Twitter, some people did enjoy using this feature. I'm not sure how uncommon it is for Japanese but it's [the recommended format for Chinese [Chinese docs]](https://github.com/ruanyf/document-style-guide/blob/master/docs/text.md) at least. If we're going to remove this feature, I'd say we should provide some alternative tools (or plugins) at the same time so that we won't bother people too much.

  2. 2

    No. Your reference is just a personal guide in chinese world. Check this officia

    No. Your reference is just a personal guide in chinese world. Check this official text layout guide.

  3. 3

    In a word, the space between cjk characters and latin characters is a pollution.

    In a word, the space between cjk characters and latin characters is a pollution. This work should be done by the layout engine instead of changing the text directly. So i think at least there should be an option to close this "feature" while removing it is a more wise action.

Validation

Resolved in prettier/prettier GitHub issue #6385. Community reactions: 11 upvotes.

Verification Summary

Worked: 5
Partial: 1
Last verified Mar 14, 2026

Sign in to verify this fix

Environment

Submitted by

AC

Alex Chen

2450 rep

Tags

prettierformattingjavascriptlang:markdownlocked-due-to-inactivity