Skip to content

Commit c7b50c0

Browse files
committed
Update changelog
1 parent 8356349 commit c7b50c0

1 file changed

Lines changed: 27 additions & 32 deletions

File tree

Lines changed: 27 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,49 @@
1-
#### Make Markdown's newline handling nearly compatible with the behavior of browsers/CSS (#16805 by @tats-u)
1+
#### Make space and newline always interchangeable between Chinese/Japanese letter and non-Chinese-or-Japanese character in Markdown (#16805 by @tats-u)
22

3-
Markdown documents formatted by Prettier are ultimately rendered in browsers in most cases. Major Markdown-to-HTML converters do not touch newline characters in Markdown paragraphs and leave them to browsers. However, Prettier's newline handling when `proseWrap` is set to `always` or `never` has not been compatible with browsers' behavior.
3+
Markdown documents formatted by Prettier are ultimately rendered in browsers in most cases. Major Markdown-to-HTML converters do not touch newline characters in Markdown paragraphs and leave them to browsers. However, Prettier's newline handling when `proseWrap` is set to `always` or `never` has not been compatible with the behavior of CSS/browsers (especially Firefox).
44

5-
https://wpt.fyi/results/css/css-text/line-breaking?label=master&label=experimental&aligned&q=segment-break-transformation-rules-
5+
https://wpt.fyi/results/css/css-text/line-breaking?label=master&label=experimental&aligned&q=segment-break-transformation-
66

77
The PR [#11597](https://github.com/prettier/prettier/pull/11597) mistakenly introduced an excessively complex specification that a newline between han and an non-CJK character can be converted to a space or just removed depending on the frequency of spaces between han and non-CJK characters, but it is not compatible with any browsers' behavior. Therefore, we removed this specification and conform to the browser's behavior.
88

9-
This change allows us to treat a line break between a Chinese/Japanese non-punctuation character and a non-Chinese/Japanese character as interchangeable with a space without conditions even when `proseWrap` is set to `always`.
9+
This change allows us to treat a line break between a Chinese/Japanese non-punctuation character and a non-Chinese/Japanese character as interchangeable with a space without conditions even when `proseWrap` is set to `always`. It also improve the visual consistency of rendered Markdown documents between Prettier and browsers.
1010

1111
<!-- prettier-ignore -->
1212
```md
1313
<!-- Input (--prose-wrap=always --print-width=20) -->
14-
日本語 English 汉语 English 漢語 English
15-
日本語 English 汉语 English 漢語 English
14+
日本語 English 中文 English
15+
日本語 English 中文 English
1616
日本語
1717
English
18-
汉语
18+
中文
1919
English
20-
漢語
21-
English
22-
日本語English汉语English漢語English
20+
日本語English中文English
2321

24-
日本語English汉语English漢語English
25-
日本語English汉语English漢語English
22+
日本語English中文English
23+
日本語English中文English
2624
日本語
2725
English
28-
汉语
29-
English
30-
漢語
26+
中文
3127
English
32-
日本語 English 汉语 English 漢語 English
28+
日本語 English 中文 English
3329

3430
<!-- Prettier stable -->
35-
日本語 English 汉语 English 漢語 English 日本語 English 汉语 English 漢語 English 日本語 English 汉语 English 漢語 English 日本語English汉语English漢語English
31+
日本語 English 中文 English 日本語 English 中文 English 日本語 English 中文 English 日本語English中文English
3632

37-
日本語English汉语English漢語English日本語English汉语English漢語English日本語 English 汉语English 漢語 English日本語 English 汉语English 漢語 English
33+
日本語English中文English日本語English中文English日本語English中文English日本語 English 中文 English
3834

3935
<!-- Prettier main -->
40-
日本語 English 汉语
41-
English 漢語 English
42-
日本語 English 汉语
43-
English 漢語 English
44-
日本語 English 汉语
45-
English 漢語 English
46-
日本語English汉语English漢語English
47-
48-
日本語English汉语English漢語English
49-
日本語English汉语English漢語English
50-
日本語 English 汉语
51-
English 漢語 English
52-
日本語 English 汉语
53-
English 漢語 English
36+
日本語 English 中文
37+
English 日本語
38+
English 中文 English
39+
日本語 English 中文
40+
English
41+
日本語English中文English
42+
43+
日本語English中文English
44+
日本語English中文English
45+
日本語 English 中文
46+
English 日本語
47+
English 中文 English
48+
5449
```

0 commit comments

Comments
 (0)