Skip to content

Commit 950b893

Browse files
committed
Revert to use <span> again
1 parent 8343be4 commit 950b893

27 files changed

+106
-106
lines changed

Zend/tests/bug35655.phpt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ EOT
1919
highlight_string($code);
2020
?>
2121
--EXPECT--
22-
<pre style="color: #000000">
23-
<code style="color: #0000BB">&lt;?php
24-
$x </code><code style="color: #007700">= &lt;&lt;&lt;EOT
25-
</code><code style="color: #DD0000">some string
26-
</code><code style="color: #007700">EOT
27-
</code><code style="color: #0000BB">$y </code><code style="color: #007700">= </code><code style="color: #0000BB">2</code><code style="color: #007700">;
28-
</code><code style="color: #0000BB">?&gt;</code></pre>
22+
<pre><code style="color: #000000">
23+
<span style="color: #0000BB">&lt;?php
24+
$x </span><span style="color: #007700">= &lt;&lt;&lt;EOT
25+
</span><span style="color: #DD0000">some string
26+
</span><span style="color: #007700">EOT
27+
</span><span style="color: #0000BB">$y </span><span style="color: #007700">= </span><span style="color: #0000BB">2</span><span style="color: #007700">;
28+
</span><span style="color: #0000BB">?&gt;</span></code></pre>

Zend/tests/bug42767.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ highlight.html = #000000
1111
highlight_string('<?php /*some comment..');
1212
?>
1313
--EXPECT--
14-
<pre style="color: #000000"><code style="color: #0000BB">&lt;?php </code><code style="color: #FF8000">/*some comment..</code></pre>
14+
<pre><code style="color: #000000"><span style="color: #0000BB">&lt;?php </span><span style="color: #FF8000">/*some comment..</span></code></pre>

Zend/tests/bug71086.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ var_dump($highlightedString);
88

99
?>
1010
--EXPECT--
11-
string(126) "<pre style="color: #000000"><code style="color: #0000BB">&lt;?php
12-
09 09 09</code><code style="color: #007700">;</code></pre>"
11+
string(139) "<pre><code style="color: #000000"><span style="color: #0000BB">&lt;?php
12+
09 09 09</span><span style="color: #007700">;</span></code></pre>"

Zend/tests/nowdoc_013.phpt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ EOF;
2020
highlight_string($code);
2121
?>
2222
--EXPECT--
23-
<pre style="color: #000000"><code style="color: #0000BB">&lt;?php
24-
$x </code><code style="color: #007700">= &lt;&lt;&lt;'EOT'
25-
</code><code style="color: #DD0000">some string
26-
</code><code style="color: #007700">EOT
27-
</code><code style="color: #0000BB">$y </code><code style="color: #007700">= </code><code style="color: #0000BB">2</code><code style="color: #007700">;
28-
</code><code style="color: #0000BB">?&gt;</code></pre>
23+
<pre><code style="color: #000000"><span style="color: #0000BB">&lt;?php
24+
$x </span><span style="color: #007700">= &lt;&lt;&lt;'EOT'
25+
</span><span style="color: #DD0000">some string
26+
</span><span style="color: #007700">EOT
27+
</span><span style="color: #0000BB">$y </span><span style="color: #007700">= </span><span style="color: #0000BB">2</span><span style="color: #007700">;
28+
</span><span style="color: #0000BB">?&gt;</span></code></pre>

Zend/tests/nowdoc_014.phpt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ EOF;
1818
highlight_string($code);
1919
?>
2020
--EXPECT--
21-
<pre style="color: #000000"><code style="color: #0000BB">&lt;?php
22-
$x </code><code style="color: #007700">= &lt;&lt;&lt;'EOT'
21+
<pre><code style="color: #000000"><span style="color: #0000BB">&lt;?php
22+
$x </span><span style="color: #007700">= &lt;&lt;&lt;'EOT'
2323
EOT
24-
</code><code style="color: #0000BB">$y </code><code style="color: #007700">= </code><code style="color: #0000BB">2</code><code style="color: #007700">;
25-
</code><code style="color: #0000BB">?&gt;</code></pre>
24+
</span><span style="color: #0000BB">$y </span><span style="color: #007700">= </span><span style="color: #0000BB">2</span><span style="color: #007700">;
25+
</span><span style="color: #0000BB">?&gt;</span></code></pre>

Zend/zend_highlight.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ ZEND_API void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini
8282
char *last_color = syntax_highlighter_ini->highlight_html;
8383
char *next_color;
8484

85-
zend_printf("<pre style=\"color: %s\">", last_color);
85+
zend_printf("<pre><code style=\"color: %s\">", last_color);
8686
/* highlight stuff coming back from zendlex() */
8787
while ((token_type=lex_scan(&token, NULL))) {
8888
switch (token_type) {
@@ -127,11 +127,11 @@ ZEND_API void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini
127127

128128
if (last_color != next_color) {
129129
if (last_color != syntax_highlighter_ini->highlight_html) {
130-
zend_printf("</code>");
130+
zend_printf("</span>");
131131
}
132132
last_color = next_color;
133133
if (last_color != syntax_highlighter_ini->highlight_html) {
134-
zend_printf("<code style=\"color: %s\">", last_color);
134+
zend_printf("<span style=\"color: %s\">", last_color);
135135
}
136136
}
137137

@@ -155,9 +155,9 @@ ZEND_API void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini
155155
}
156156

157157
if (last_color != syntax_highlighter_ini->highlight_html) {
158-
zend_printf("</code>");
158+
zend_printf("</span>");
159159
}
160-
zend_printf("</pre>");
160+
zend_printf("</code></pre>");
161161

162162
/* Discard parse errors thrown during tokenization */
163163
zend_clear_exception();

ext/phar/tests/cache_list/frontcontroller15.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ files/frontcontroller8.phar
1414
--EXPECTHEADERS--
1515
Content-type: text/html; charset=UTF-8
1616
--EXPECT--
17-
<pre style="color: #000000"><code style="color: #0000BB">&lt;?php </code><code style="color: #007700">function </code><code style="color: #0000BB">hio</code><code style="color: #007700">(){}</code></pre>
17+
<pre><code style="color: #000000"><span style="color: #0000BB">&lt;?php </span><span style="color: #007700">function </span><span style="color: #0000BB">hio</span><span style="color: #007700">(){}</span></code></pre>

ext/phar/tests/cache_list/frontcontroller3.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ files/frontcontroller.phar
1414
--EXPECTHEADERS--
1515
Content-type: text/html; charset=UTF-8
1616
--EXPECT--
17-
<pre style="color: #000000"><code style="color: #0000BB">&lt;?php </code><code style="color: #007700">function </code><code style="color: #0000BB">hio</code><code style="color: #007700">(){}</code></pre>
17+
<pre><code style="color: #000000"><span style="color: #0000BB">&lt;?php </span><span style="color: #007700">function </span><span style="color: #0000BB">hio</span><span style="color: #007700">(){}</span></code></pre>

ext/phar/tests/cache_list/frontcontroller9.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ files/frontcontroller3.phar
1414
--EXPECTHEADERS--
1515
Content-type: text/html; charset=UTF-8
1616
--EXPECT--
17-
<pre style="color: #000000"><code style="color: #0000BB">&lt;?php </code><code style="color: #007700">function </code><code style="color: #0000BB">hio</code><code style="color: #007700">(){}</code></pre>
17+
<pre><code style="color: #000000"><span style="color: #0000BB">&lt;?php </span><span style="color: #007700">function </span><span style="color: #0000BB">hio</span><span style="color: #007700">(){}</span></code></pre>

ext/phar/tests/frontcontroller15.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ files/frontcontroller8.phar
1313
--EXPECTHEADERS--
1414
Content-type: text/html; charset=UTF-8
1515
--EXPECT--
16-
<pre style="color: #000000"><code style="color: #0000BB">&lt;?php </code><code style="color: #007700">function </code><code style="color: #0000BB">hio</code><code style="color: #007700">(){}</code></pre>
16+
<pre><code style="color: #000000"><span style="color: #0000BB">&lt;?php </span><span style="color: #007700">function </span><span style="color: #0000BB">hio</span><span style="color: #007700">(){}</span></code></pre>

ext/phar/tests/frontcontroller3.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ files/frontcontroller.phar
1313
--EXPECTHEADERS--
1414
Content-type: text/html; charset=UTF-8
1515
--EXPECT--
16-
<pre style="color: #000000"><code style="color: #0000BB">&lt;?php </code><code style="color: #007700">function </code><code style="color: #0000BB">hio</code><code style="color: #007700">(){}</code></pre>
16+
<pre><code style="color: #000000"><span style="color: #0000BB">&lt;?php </span><span style="color: #007700">function </span><span style="color: #0000BB">hio</span><span style="color: #007700">(){}</span></code></pre>

ext/phar/tests/frontcontroller9.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ files/frontcontroller3.phar
1313
--EXPECTHEADERS--
1414
Content-type: text/html; charset=UTF-8
1515
--EXPECT--
16-
<pre style="color: #000000"><code style="color: #0000BB">&lt;?php </code><code style="color: #007700">function </code><code style="color: #0000BB">hio</code><code style="color: #007700">(){}</code></pre>
16+
<pre><code style="color: #000000"><span style="color: #0000BB">&lt;?php </span><span style="color: #007700">function </span><span style="color: #0000BB">hio</span><span style="color: #007700">(){}</span></code></pre>

ext/phar/tests/tar/frontcontroller15.phar.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ files/frontcontroller8.phar.tar
1313
--EXPECTHEADERS--
1414
Content-type: text/html; charset=UTF-8
1515
--EXPECT--
16-
<pre style="color: #000000"><code style="color: #0000BB">&lt;?php </code><code style="color: #007700">function </code><code style="color: #0000BB">hio</code><code style="color: #007700">(){}</code></pre>
16+
<pre><code style="color: #000000"><span style="color: #0000BB">&lt;?php </span><span style="color: #007700">function </span><span style="color: #0000BB">hio</span><span style="color: #007700">(){}</span></code></pre>

ext/phar/tests/tar/frontcontroller3.phar.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ files/frontcontroller.phar.tar
1313
--EXPECTHEADERS--
1414
Content-type: text/html; charset=UTF-8
1515
--EXPECT--
16-
<pre style="color: #000000"><code style="color: #0000BB">&lt;?php </code><code style="color: #007700">function </code><code style="color: #0000BB">hio</code><code style="color: #007700">(){}</code></pre>
16+
<pre><code style="color: #000000"><span style="color: #0000BB">&lt;?php </span><span style="color: #007700">function </span><span style="color: #0000BB">hio</span><span style="color: #007700">(){}</span></code></pre>

ext/phar/tests/tar/frontcontroller9.phar.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ files/frontcontroller3.phar.tar
1313
--EXPECTHEADERS--
1414
Content-type: text/html; charset=UTF-8
1515
--EXPECT--
16-
<pre style="color: #000000"><code style="color: #0000BB">&lt;?php </code><code style="color: #007700">function </code><code style="color: #0000BB">hio</code><code style="color: #007700">(){}</code></pre>
16+
<pre><code style="color: #000000"><span style="color: #0000BB">&lt;?php </span><span style="color: #007700">function </span><span style="color: #0000BB">hio</span><span style="color: #007700">(){}</span></code></pre>

ext/phar/tests/zip/frontcontroller15.phar.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ files/frontcontroller8.phar.zip
1515
--EXPECTHEADERS--
1616
Content-type: text/html; charset=UTF-8
1717
--EXPECT--
18-
<pre style="color: #000000"><code style="color: #0000BB">&lt;?php </code><code style="color: #007700">function </code><code style="color: #0000BB">hio</code><code style="color: #007700">(){}</code></pre>
18+
<pre><code style="color: #000000"><span style="color: #0000BB">&lt;?php </span><span style="color: #007700">function </span><span style="color: #0000BB">hio</span><span style="color: #007700">(){}</span></code></pre>

ext/phar/tests/zip/frontcontroller3.phar.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ files/frontcontroller.phar.zip
1515
--EXPECTHEADERS--
1616
Content-type: text/html; charset=UTF-8
1717
--EXPECT--
18-
<pre style="color: #000000"><code style="color: #0000BB">&lt;?php </code><code style="color: #007700">function </code><code style="color: #0000BB">hio</code><code style="color: #007700">(){}</code></pre>
18+
<pre><code style="color: #000000"><span style="color: #0000BB">&lt;?php </span><span style="color: #007700">function </span><span style="color: #0000BB">hio</span><span style="color: #007700">(){}</span></code></pre>

ext/phar/tests/zip/frontcontroller9.phar.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ files/frontcontroller3.phar.zip
1313
--EXPECTHEADERS--
1414
Content-type: text/html; charset=UTF-8
1515
--EXPECT--
16-
<pre style="color: #000000"><code style="color: #0000BB">&lt;?php </code><code style="color: #007700">function </code><code style="color: #0000BB">hio</code><code style="color: #007700">(){}</code></pre>
16+
<pre><code style="color: #000000"><span style="color: #0000BB">&lt;?php </span><span style="color: #007700">function </span><span style="color: #0000BB">hio</span><span style="color: #007700">(){}</span></code></pre>

ext/standard/tests/general_functions/highlight_heredoc.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ DDDD;
1616
highlight_string($str);
1717
?>
1818
--EXPECT--
19-
<pre style="color: #000000">
19+
<pre><code style="color: #000000">
2020
$x=&lt;&lt;&lt;DD
2121
jhdsjkfhjdsh
2222
DD
2323
."";
2424
$a=&lt;&lt;&lt;DDDD
2525
jhdsjkfhjdsh
2626
DDDD;
27-
</pre>
27+
</code></pre>

ext/standard/tests/strings/highlight_file.phpt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,14 @@ Warning: highlight_file(%shighlight_file.dat): Failed to open stream: No such fi
4242

4343
Warning: highlight_file(): Failed opening '%shighlight_file.dat' for highlighting in %s on line %d
4444
bool(false)
45-
<pre style="color: #000000"><code style="color: #0000BB">&lt;?php </code><code style="color: #007700">echo </code><code style="color: #DD0000">"test"</code><code style="color: #007700">; </code><code style="color: #0000BB">?&gt;</code></pre>bool(true)
46-
<pre style="color: #000000"><code style="color: #0000BB">&lt;?php </code><code style="color: #007700">echo </code><code style="color: #DD0000">"test ?&gt;</code></pre>bool(true)
47-
<pre style="color: #000000">
48-
<code style="color: #0000BB">&lt;?php
49-
</code><code style="color: #007700">class </code><code style="color: #0000BB">test </code><code style="color: #007700">{
50-
public </code><code style="color: #0000BB">$var </code><code style="color: #007700">= </code><code style="color: #0000BB">1</code><code style="color: #007700">;
51-
private function </code><code style="color: #0000BB">foo</code><code style="color: #007700">() { echo </code><code style="color: #DD0000">"foo"</code><code style="color: #007700">; }
52-
public function </code><code style="color: #0000BB">bar</code><code style="color: #007700">() { </code><code style="color: #0000BB">var_dump</code><code style="color: #007700">(</code><code style="color: #0000BB">test</code><code style="color: #007700">::</code><code style="color: #0000BB">foo</code><code style="color: #007700">()); }
45+
<pre><code style="color: #000000"><span style="color: #0000BB">&lt;?php </span><span style="color: #007700">echo </span><span style="color: #DD0000">"test"</span><span style="color: #007700">; </span><span style="color: #0000BB">?&gt;</span></code></pre>bool(true)
46+
<pre><code style="color: #000000"><span style="color: #0000BB">&lt;?php </span><span style="color: #007700">echo </span><span style="color: #DD0000">"test ?&gt;</span></code></pre>bool(true)
47+
<pre><code style="color: #000000">
48+
<span style="color: #0000BB">&lt;?php
49+
</span><span style="color: #007700">class </span><span style="color: #0000BB">test </span><span style="color: #007700">{
50+
public </span><span style="color: #0000BB">$var </span><span style="color: #007700">= </span><span style="color: #0000BB">1</span><span style="color: #007700">;
51+
private function </span><span style="color: #0000BB">foo</span><span style="color: #007700">() { echo </span><span style="color: #DD0000">"foo"</span><span style="color: #007700">; }
52+
public function </span><span style="color: #0000BB">bar</span><span style="color: #007700">() { </span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">test</span><span style="color: #007700">::</span><span style="color: #0000BB">foo</span><span style="color: #007700">()); }
5353
}
54-
</code><code style="color: #0000BB">?&gt;</code></pre>bool(true)
54+
</span><span style="color: #0000BB">?&gt;</span></code></pre>bool(true)
5555
Done

ext/standard/tests/strings/show_source_basic.phpt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,19 @@ show_source(__FILE__);
2121
?>
2222
--EXPECT--
2323
*** Test by calling method or function with its expected arguments ***
24-
<pre style="color: #000000"><code style="color: #0000BB">&lt;?php
25-
</code><code style="color: #007700">echo </code><code style="color: #DD0000">"*** Test by calling method or function with its expected arguments ***\n"</code><code style="color: #007700">;
26-
</code><code style="color: #0000BB">$foo </code><code style="color: #007700">= </code><code style="color: #DD0000">'bar'</code><code style="color: #007700">;
27-
</code><code style="color: #0000BB">$baz </code><code style="color: #007700">= </code><code style="color: #DD0000">"something "</code><code style="color: #007700">.</code><code style="color: #0000BB">$foo</code><code style="color: #007700">.</code><code style="color: #DD0000">"\n"</code><code style="color: #007700">;
24+
<pre><code style="color: #000000"><span style="color: #0000BB">&lt;?php
25+
</span><span style="color: #007700">echo </span><span style="color: #DD0000">"*** Test by calling method or function with its expected arguments ***\n"</span><span style="color: #007700">;
26+
</span><span style="color: #0000BB">$foo </span><span style="color: #007700">= </span><span style="color: #DD0000">'bar'</span><span style="color: #007700">;
27+
</span><span style="color: #0000BB">$baz </span><span style="color: #007700">= </span><span style="color: #DD0000">"something "</span><span style="color: #007700">.</span><span style="color: #0000BB">$foo</span><span style="color: #007700">.</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;
2828

29-
if ( </code><code style="color: #0000BB">$foo </code><code style="color: #007700">== </code><code style="color: #DD0000">'bar' </code><code style="color: #007700">)
29+
if ( </span><span style="color: #0000BB">$foo </span><span style="color: #007700">== </span><span style="color: #DD0000">'bar' </span><span style="color: #007700">)
3030
{
31-
</code><code style="color: #0000BB">$baz </code><code style="color: #007700">= </code><code style="color: #DD0000">'baz'</code><code style="color: #007700">;
31+
</span><span style="color: #0000BB">$baz </span><span style="color: #007700">= </span><span style="color: #DD0000">'baz'</span><span style="color: #007700">;
3232
}
3333

34-
</code><code style="color: #FF8000">/* some code here */
34+
</span><span style="color: #FF8000">/* some code here */
3535

36-
</code><code style="color: #0000BB">show_source</code><code style="color: #007700">(</code><code style="color: #0000BB">__FILE__</code><code style="color: #007700">);
36+
</span><span style="color: #0000BB">show_source</span><span style="color: #007700">(</span><span style="color: #0000BB">__FILE__</span><span style="color: #007700">);
3737

38-
</code><code style="color: #0000BB">?&gt;
39-
</code></pre>
38+
</span><span style="color: #0000BB">?&gt;
39+
</span></code></pre>

0 commit comments

Comments
 (0)