Skip to content

Commit 791b4fb

Browse files
committed
[css-text-3] Add example for segment break transformation. w3c#3461
1 parent 3160736 commit 791b4fb

File tree

1 file changed

+43
-1
lines changed

1 file changed

+43
-1
lines changed

css-text-3/Overview.bs

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1301,7 +1301,49 @@ Characters and Letters</h3>
13011301
removed any tabs and spaces after the segment break before these checks
13021302
take place.</p>
13031303

1304-
<p class="feedback issue">Comments on how well this would work in practice would
1304+
<div class="example">
1305+
The purpose of the segment break transformation rules
1306+
(and white space collapsing in general)
1307+
is to “unbreak” text that has been
1308+
<a href="#white-space-processing">broken into segments</a>
1309+
to make the document source code easier to work with.
1310+
In languages that use word separators, such as English and Korean,
1311+
“unbreaking” a line requires joining the two lines with a space.
1312+
1313+
<figure>
1314+
<pre>
1315+
Here is an English paragraph
1316+
that is broken into multiple lines
1317+
in the source code so that it can
1318+
more easily read in a text editor.
1319+
</pre>
1320+
<p>Here is an English paragraph that is broken into multiple lines in the source code so that it can be more easily read in a text editor.</p>
1321+
<figcaption>
1322+
Eliminating a line break in English requires maintaining a space in its place.
1323+
</figcaption>
1324+
</figure>
1325+
1326+
In languages that have no word separators, such as Chinese,
1327+
“unbreaking” a line requires joining the two lines with no intervening space.
1328+
1329+
<figure>
1330+
<pre>
1331+
这个段落是呢么长,
1332+
在一行写不行。最好
1333+
用三行写。
1334+
</pre>
1335+
<p>这个段落是呢么长,在一行不行。最好用三行写。</p>
1336+
<figcaption>
1337+
Eliminating a line break in Chinese requires eliminating any intervening white space.
1338+
</figcaption>
1339+
</figure>
1340+
1341+
The segment break transformation rules thus use adjacent context
1342+
to either transform the segment break into a space
1343+
or eliminate it entirely.
1344+
</div>
1345+
1346+
<p class="feedback issue">Comments on how well these rules would work in practice would
13051347
be very much appreciated, particularly from people who work with
13061348
Thai and similar scripts.
13071349
Note that browser implementations do not currently follow these rules consistently

0 commit comments

Comments
 (0)