You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
'字': Japanese or Chinese character (e.g. kanji/han, hiragana, and katakana)
'A': One of other characters (e.g. English and Korean)
'\n': LF
' ': ASCII Space
Claims:
' ' in '字' ' ' '字' should not be converted to '\n' but kept as is
'\n' in '字' '\n' '字' should be forcibly trimmed
' ' or '\n' between '字' and 'A' can be processed by the current way (Prettier is going to forcibly convert it to ' ' but it's just due to the backward compatibility and dprint don't need to follow it)
You might want to see the following related issues/PRs in Prettier for details of backgrounds:
Describe the bug
dprint-plugin-markdown version: 0.17.8
CSS requires line breaks in Japanese/Chinese text should be trimmed instead of converted to spaces.
https://drafts.csswg.org/css-text-4/#line-break-transform
Only Firefox follows this rule today.
https://wpt.fyi/results/css/css-text/line-breaking?label=master&label=experimental&aligned&q=segment-break-transformation-
https://drafts.csswg.org/css-text-4/#line-break-transform
Chrome & Safari's behavior is treated as a bug:
Symbols for the following description:
'字'
: Japanese or Chinese character (e.g. kanji/han, hiragana, and katakana)'A'
: One of other characters (e.g. English and Korean)'\n'
: LF' '
: ASCII SpaceClaims:
' '
in'字' ' ' '字'
should not be converted to'\n'
but kept as is'\n'
in'字' '\n' '字'
should be forcibly trimmed' '
or'\n'
between'字'
and'A'
can be processed by the current way (Prettier is going to forcibly convert it to' '
but it's just due to the backward compatibility and dprint don't need to follow it)You might want to see the following related issues/PRs in Prettier for details of backgrounds:
proseWrap
isalways
prettier/prettier#16710proseWrap
isalways
prettier/prettier#14936Input Code
textWrap = always
Expected Output
Actual Output
https://dprint.dev/playground/#code/qemhpzR5UQBKYLAFDSuejrwKIDsDmAbAlgM4AWEWeRxK4SsCNa9kj5BJZObVTt1zyPFp0ocKJIA/config/N4KABGBEA2CWB2BTA6rAJgFwBaQFxgA4AGAGnCiQHcAZBRAaQTTymgDNIyJINEAPDMgBOAQwAOLSCOiURATwDOncpEQBbMVhELYCxvGb5IAVwOIhCgMYB7IYiVcoCjEOvwA5vsNRtvIboBrBxVYd3hbRAARWDtLDFgAN0RJNDF-eAwAWlDwu2VuHIiAMVhoKJjEOMTko1T0rMK7TLZS5MdIRsQAZQwRIQxo2PiklLSEBrCIzOc+jHyoToBRA0HK4ZqoOvHsyabEA0gQAF8QIA/plugin/markdown
The text was updated successfully, but these errors were encountered: