@@ -5721,51 +5721,37 @@ Bidirectionality and Line Boxes</h3>
5721
5721
5722
5722
5723
5723
<div class="example">
5724
- <p> In the following example:
5724
+ <p> Because neutral characters (such as punctuation)
5725
+ and isolated runs are skipped
5726
+ when <a href="http://unicode.org/reports/tr9/#P2">finding the inline base direction of a plaintext bidi paragraph</a> ,
5727
+ the line box in the following example will be left-to-right
5728
+ (and thus left-aligned given ''text-align: start'' ),
5729
+ as dictated by the first strong character, ‘h’:
5725
5730
<pre>
5726
5731
<para style="display: block; direction: rtl; unicode-bidi:plaintext">
5727
- <quote style="unicode-bidi:plaintext">שלום!</quote>" , he said.
5732
+ “ <quote style="unicode-bidi:plaintext">שלום!</quote>” , he said.
5728
5733
</para></pre>
5729
-
5730
- <p> The result should be a left-aligned line looking like this:
5731
- <pre> "!שלום", he said.</pre>
5732
-
5733
- <p> The line is left-aligned
5734
- (despite the containing block having ''direction: rtl'' )
5735
- because the containing block (the <code> <para></code> ) has ''unicode-bidi:plaintext'' ,
5736
- and the line box belongs to a bidi paragraph that is LTR.
5737
- This is because that paragraph's first character with a strong direction
5738
- is the LTR "h" from "he". The RTL "שלום!" does precede the "he",
5739
- but it sits in its own bidi-isolated paragraph that is <em> not</em>
5740
- immediately contained by the <code> <para></code> ,
5741
- and is thus irrelevant to the line box's alignment.
5742
- From from the standpoint of the bidi paragraph immediately contained
5743
- by the <code> <para></code> containing block,
5744
- the <code> <quote></code> ’s bidi-isolated paragraph inside it is,
5745
- by definition, just a neutral U+FFFC character,
5746
- so the immediately-contained paragraph becomes LTR by virtue
5747
- of the "he" following it.
5748
5734
</div>
5749
5735
5750
5736
<div class="example">
5751
5737
<pre>
5752
- <fieldset style="direction: rtl">
5753
- <textarea style="unicode-bidi:plaintext">
5738
+ <textarea style="direction: rtl; unicode-bidi:plaintext">
5754
5739
5755
5740
Hello!
5756
5741
5757
5742
</textarea>
5758
- </fieldset></pre>
5759
-
5760
- <p> As expected, the "Hello!" should be displayed LTR
5761
- (i.e. with the exclamation mark on the right end,
5762
- despite the <code> <textarea></code> ’s ''direction:rtl'' )
5763
- and left-aligned.
5764
- This makes the empty line following it left-aligned as well,
5765
- which means that the caret on that line should appear at its
5766
- left edge. The first empty line, on the other hand, should
5767
- be right-aligned, due to the RTL direction of its containing
5768
- paragraph, the <code> <textarea></code> .
5743
+ </pre>
5744
+
5745
+ <p> Because of ''unicode-bidi: plaintext'' ,
5746
+ the “Hello!” is typeset LTR
5747
+ (i.e. with the exclamation mark on the right side)
5748
+ and left-aligned,
5749
+ ignoring the containing block’s RTL 'direction' .
5750
+ This makes the empty line following it LTR as well,
5751
+ which means that a caret on that line should appear at its left edge.
5752
+ The empty first line, however, is right-aligned:
5753
+ having no preceding line,
5754
+ it assumes the RTL direction of its containing block.
5769
5755
</div>
5770
5756
5771
5757
<h2 class="no-num" id="order">Appendix A:
0 commit comments