Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Markdown: unnecessary space is inserted between Korean & English words #5028

Closed
appetizermonster opened this issue Aug 30, 2018 · 4 comments
Closed
Labels
lang:markdown Issues affecting Markdown locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. status:has pr Issues with an accompanying pull request. These issues will probably be fixed soon! type:bug Issues identifying ugly output, or a defect in the program
Milestone

Comments

@appetizermonster
Copy link

Prettier 1.14.2
Playground link

--parser markdown

Input:

안녕하세요. 저는 Prettier을 굉장히 잘 사용하고 있습니다.
그런데 Prettier는 영어와 한글 사이에 무조건 빈 공간을 입력하고 있어요.
... ㅠㅠ

Output:

안녕하세요. 저는 Prettier 을 굉장히 잘 사용하고 있습니다.
그런데 Prettier 는 영어와 한글 사이에 무조건 빈 공간을 입력하고 있어요.
... ㅠㅠ

Expected behavior:

안녕하세요. 저는 Prettier을 굉장히 잘 사용하고 있습니다.
그런데 Prettier는 영어와 한글 사이에 무조건 빈 공간을 입력하고 있어요.
... ㅠㅠ

Currently, markdown formatting automatically inserts unnecessary spaces between Korean & English characters.
I guess that the issue is caused by #3026 (cjk support in markdown).

Korean already has the syntax for spacing, So automatically inserting spaces between e(english) & k(korean) is not neccesary.

@ikatyang ikatyang added type:bug Issues identifying ugly output, or a defect in the program lang:markdown Issues affecting Markdown and removed type:bug Issues identifying ugly output, or a defect in the program labels Aug 30, 2018
@ikatyang
Copy link
Member

ikatyang commented Aug 30, 2018

Is the space there invalid (i.e., its meaning changed) or unnecessary? We added spaces there for readability, I know it's valid in Chinese and Japanese, but I'm not sure if it's valid in Korean.

@ikatyang ikatyang added the status:awaiting response Issues that require answers to questions from maintainers before action can be taken label Aug 30, 2018
@appetizermonster
Copy link
Author

no critical meaning changes but it's awkward mostly. so I think there is no need to insert spaces for Korean.

@no-response no-response bot removed the status:awaiting response Issues that require answers to questions from maintainers before action can be taken label Aug 30, 2018
@ikatyang
Copy link
Member

According to Korean Text Layout and pp. 518 of CJKV Information Processing (ref: ikatyang/cjk-regex#48), the convention is to use extra space:

Space setting between character classes: Set up spaces between each character class.

If the document is primarily composed of CJKV glyphs with some glyphs sprinkled throughout, then the convention or principle is to use extra space to these two classes of glyphs.

@ikatyang ikatyang added the status:awaiting response Issues that require answers to questions from maintainers before action can be taken label Aug 30, 2018
@appetizermonster
Copy link
Author

Thank you for letting me know about the official(or standard) documents.
but I couldn't understand what the documents say 😢
Anyway in reality, we don't insert space between Latin & Hangul, we just follow the Hangul spacing rules.

Here are some examples:


and this is the case where we follow the Hangul spacing rules in Latin characters:
https://support.google.com/accounts/answer/463?hl=ko
image

@no-response no-response bot removed the status:awaiting response Issues that require answers to questions from maintainers before action can be taken label Sep 1, 2018
@ikatyang ikatyang added the type:bug Issues identifying ugly output, or a defect in the program label Sep 1, 2018
@ikatyang ikatyang added the status:has pr Issues with an accompanying pull request. These issues will probably be fixed soon! label Sep 1, 2018
ikatyang added a commit that referenced this issue Sep 2, 2018
Based on #5028 (comment), it seems Korean text uses conventional space so we're not going to add whitespaces between Latin and Hangul.
@ikatyang ikatyang added this to the 1.15 milestone Oct 25, 2018
@lock lock bot added the locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. label Jan 23, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jan 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lang:markdown Issues affecting Markdown locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. status:has pr Issues with an accompanying pull request. These issues will probably be fixed soon! type:bug Issues identifying ugly output, or a defect in the program
Projects
None yet
Development

No branches or pull requests

2 participants