Prettier 2.8.8
Playground link
# Options (if any):
--print-width=40 --prose-wrap=always
Input:
English 日本語日本語日本語日本語日本語日本語日本語日本語日本語日本語日本語日本語日本語日本語日本語日本語日本語日本語 English
Output:
English 日本語日本語日本語日本語日本語日
本語日本語日本語日本語日本語日本語日本語
日本語日本語日本語日本語日本語日本語
English
Expected behavior:
English
日本語日本語日本語日本語日本語日本語日本語日本語日本語日本語日本語日本語日本語日本語日本語日本語日本語日本語
English
Almost all Markdown renderers always treat the line breaking as space even if han/kana is included in characters surrounding it.
English 日本語日本語日本語日本語日本語日
本語日本語日本語日本語日本語日本語日本語
日本語日本語日本語日本語日本語日本語
English
↓
English 日本語日本語日本語日本語日本語日 本語日本語日本語日本語日本語日本語日本語 日本語日本語日本語日本語日本語日本 English
Which should Prettier consider is more important, the appearance of formatted documents, or the compatibility with Markdown renderers?
It is OK for me to keep the current behavior and ask authors of renderers to change their behavior.
Need to be monitored:
Subissue (Note: most readers will want a fix for this instead):
Memo:
#3026 (the beginning of the nightmare)
↓
#5040 (mitigation for Korean)
↓
#11597 (mitigation)
↓
#14936 (fix for this issue)
Prettier 2.8.8
Playground link
# Options (if any): --print-width=40 --prose-wrap=alwaysInput:
Output:
Expected behavior:
Almost all Markdown renderers always treat the line breaking as space even if han/kana is included in characters surrounding it.
↓
Which should Prettier consider is more important, the appearance of formatted documents, or the compatibility with Markdown renderers?
It is OK for me to keep the current behavior and ask authors of renderers to change their behavior.Need to be monitored:
Subissue (Note: most readers will want a fix for this instead):
proseWrapisalways#16710Memo:
#3026 (the beginning of the nightmare)
↓
#5040 (mitigation for Korean)
↓
#11597 (mitigation)
↓
#14936 (fix for this issue)