Skip to content

Commit f837553

Browse files
committed
[CSS2] add lang-xml to some pre elements
This just adds lang-xml to pre elements with no lang-* class whose contents can be parsed as XML, as it is unlikely for arbitrary content to parse as XML (potentially some of this is intended to be HTML, but highlighting it as if it is XML is unlikely to be harmful).
1 parent 967ae7d commit f837553

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

css2/Overview.bs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4130,7 +4130,7 @@ can often be described by a fictional tag sequence that closes and
41304130
then re-opens the element. Thus, if we mark up the previous paragraph
41314131
with a SPAN element:</p>
41324132

4133-
<pre>
4133+
<pre class="lang-xml">
41344134
&lt;P&gt;<b>&lt;SPAN class="test"&gt;</b> This is a somewhat long HTML
41354135
paragraph that will be broken into several
41364136
lines.<b>&lt;/SPAN&gt;</b> The first line will be identified
@@ -4161,7 +4161,7 @@ container element.</a>
41614161
element may occur inside a
41624162
block-level descendant in the same flow (i.e., a block-level
41634163
descendant that is not positioned and not a float). E.g., the first
4164-
line of the DIV in <code>&lt;DIV&gt;&lt;P&gt;This
4164+
line of the DIV in <code class="lang-xml">&lt;DIV&gt;&lt;P&gt;This
41654165
line...&lt;/P&gt;&lt;/DIV&gt;</code> is the first line of the P (assuming
41664166
that both P and DIV are block-level).
41674167

@@ -4182,7 +4182,7 @@ block-level element. (Since CSS1 and CSS2&nbsp;(1998) were silent on this case,
41824182
authors should not rely on this behavior.) Here is an example. The
41834183
fictional tag sequence for
41844184

4185-
<pre>
4185+
<pre class="lang-xml">
41864186
&lt;DIV&gt;
41874187
&lt;P&gt;First paragraph&lt;/P&gt;
41884188
&lt;P&gt;Second paragraph&lt;/P&gt;
@@ -4544,7 +4544,7 @@ not.
45444544
Suppose there is an H1 element with an emphasizing element (EM)
45454545
inside:</p>
45464546

4547-
<pre>
4547+
<pre class="lang-xml">
45484548
&lt;H1&gt;The headline &lt;EM&gt;is&lt;/EM&gt; important!&lt;/H1&gt;
45494549
</pre>
45504550

@@ -7307,7 +7307,7 @@ set to zero, the position of the float is undefined.
73077307
<div class="example">
73087308
<p>This HTML fragment results in the b floating to the right.
73097309

7310-
<pre>
7310+
<pre class="lang-xml">
73117311
&lt;P&gt;a&lt;SPAN style="float: right"&gt;b&lt;/SPAN&gt;&lt;/P&gt;
73127312
</pre>
73137313

@@ -7483,7 +7483,7 @@ which the
74837483
clearance is -1em. (Assume none of the elements have borders or
74847484
padding):
74857485

7486-
<pre class="html">
7486+
<pre class="lang-html">
74877487
&lt;p style="<b>margin-bottom: 4em</b>"&gt;
74887488
First paragraph.
74897489

@@ -10904,7 +10904,7 @@ elements that are not nested, is the following. This shows how the
1090410904
style rules given above to number chapters and sections would apply to
1090510905
the markup given.
1090610906

10907-
<pre>
10907+
<pre class="lang-xml">
1090810908
&lt;!--"chapter" counter|"section" counter --&gt;
1090910909
&lt;body&gt; &lt;!-- {chapter=0 | --&gt;
1091010910
&lt;h1&gt;About CSS&lt;/h1&gt; &lt;!-- chapter++ (=1) | {section=0 --&gt;
@@ -13444,7 +13444,7 @@ In the following style sheet and document fragment:
1344413444
anonymous inline element that surrounds the span element, causing
1344513445
the text "Help, help!" to be blue, with the blue underlining from
1344613446
the anonymous inline underneath it, the color being taken from the
13447-
blockquote element. The <code>&lt;em&gt;text&lt;/em&gt;</code>
13447+
blockquote element. The <code class="lang-xml">&lt;em&gt;text&lt;/em&gt;</code>
1344813448
in the em block is also underlined,
1344913449
as it is in an in-flow block to which the underline is propagated. The final line of text is fuchsia, but the underline
1345013450
underneath it is still the blue underline from the anonymous inline
@@ -13749,7 +13749,7 @@ CSS&nbsp;2 does not fully define where line breaking opportunities occur.</em>
1374913749
<p>
1375013750
Given the following markup fragment, taking special note of spaces (with varied backgrounds and borders for emphasis and identification):
1375113751
</p>
13752-
<pre><code>
13752+
<pre class="lang-xml"><code>
1375313753

1375413754
&lt;ltr&gt;A<span class="egbidiwsaA">&nbsp;</span>&lt;rtl&gt;<span class="egbidiwsbB">&nbsp;</span>B<span class="egbidiwsaB">&nbsp;</span>&lt;/rtl&gt;<span class="egbidiwsbC">&nbsp;</span>C&lt;/ltr&gt;
1375513755

@@ -14404,7 +14404,7 @@ anonymous cell object to be created as well.</em>
1440414404
<p>Here is an example illustrating rule 5. The following illegal
1440514405
(X)HTML snippet defines conflicting cells:
1440614406

14407-
<pre>
14407+
<pre class="lang-xml">
1440814408
&lt;table&gt;
1440914409
&lt;tr&gt;&lt;td&gt;1 &lt;/td&gt;&lt;td rowspan="2"&gt;2 &lt;/td&gt;&lt;td&gt;3 &lt;/td&gt;&lt;td&gt;4 &lt;/td&gt;&lt;/tr&gt;
1441014410
&lt;tr&gt;&lt;td colspan="2"&gt;5 &lt;/td&gt;&lt;/tr&gt;
@@ -16610,7 +16610,7 @@ category and subtotal. Some cells define marks along an axis while
1661016610
others give money spent at points within this space. The markup
1661116611
for this table is:</p>
1661216612

16613-
<pre>
16613+
<pre class="lang-xml">
1661416614
&lt;TABLE&gt;
1661516615
&lt;CAPTION&gt;Travel Expense Report&lt;/CAPTION&gt;
1661616616
&lt;TR&gt;

0 commit comments

Comments
 (0)