Open ryuapp opened 3 weeks ago
I personally prefer preserve
(it's the default in dprint-plugin-markdown)
I don't have very strong opinions, but the pro of setting it to always
is that you always linebreak at 80 columns - you don't get very long lines.
I don't have very strong opinions, but the pro of setting it to always is that you always linebreak at 80 columns - you don't get very long lines.
After seeing this, I realized that the problem is that deno fmt
does not support natural language formats such as Japanese and Chinese in the first place. I stated the problem there(https://github.com/dprint/dprint-plugin-markdown/issues/120).
Natural languages like Japanese and Chinese do not use spaces to separate text. However, English words often appear in sentences, so they are separated unnaturally. Ref: https://en.wikipedia.org/wiki/Word_divider#Types
I don't know if deno fmt
will support them in the future, but basically it is difficult to properly separate those languages text. That's why I think preserve being the default is very valuable.
This cons may not exist in anglosphere, but a popular Japanese technology blog site (Zenn) recognizes new lines in markdown as new lines, so when markdown is formatted using
deno fmt
, it will break. Also, the commonly used Prettier's defaults to prose-wrap:preserve
. Therefore, it is better to set prose-wrap topreserve
by default.I understand that it can be changed in the options, but I don't know the pros of setting it to
always
by default.Related: https://github.com/denoland/deno/issues/9191 https://github.com/prettier/prettier/issues/6516