Skip to content

Do not insert whitespaces between latin and cj letters #6385

@sosukesuzuki

Description

@sosukesuzuki

Environments:

  • Prettier Version: 1.18.2

Steps to reproduce:

// Input
私はJavaScriptが好きです

Expected behavior:

私はJavaScriptが好きです

Actual behavior:

私は JavaScript が好きです

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    lang:markdownIssues affecting Markdownlocked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions