doddoreul / google-code-prettify

Automatically exported from code.google.com/p/google-code-prettify
Apache License 2.0
0 stars 0 forks source link

php-code-interpeter parses literal php close tag as non-literal #160

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
put a php file with the attached code like here: 
http://code.google.com/p/intsmarty/source/browse/trunk/intsmarty.class.php#188

What is the expected output? What do you see instead?
coloring continues after the literal
(return = blue, comments = red etc)

What browser (or hg/svn client) are you using? On what operating system?
Google Chrome   12.0.742.100 (Official Build 88853)
WebKit  534.30 (branches/chromium/742@88085)
V8  3.2.10.15

on ubuntu maverick
Please provide any additional information below.
funny is that '<?php' is not interpeted
and '?>' is and should not(is a literal string)

the code(yes im putting php code into $code(generates php code from))
---------8<------------------8<------------------8<---------
$code = '<?php $__LANG = '.var_export($this->translation, true).'; ?>';
---------8<------------------8<------------------8<---------

The Resulting html (as you can see the 2and line(tr) is plain(pln)
---------8<------------------8<------------------8<---------
<tr id="sl_svn2_193">
<td class="source">
 <span class="pln">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $code </span>
 <span class="pun">=</span><span class="pln"> </span>
 <span class="str">'&lt;?php $__LANG = '</span>
 <span class="pun">.</span>
 <span class="pln">var_export</span>
 <span class="pun">(</span>
 <span class="pln">$this</span>
 <span class="pun">-&gt;</span>
 <span class="pln">translation</span>
 <span class="pun">,</span><span class="pln"> </span>
 <span class="kwd">true</span>
 <span class="pun">).</span>
 <span class="str">'; </span>
 <span class="pun">?&gt;</span>
 <span class="pln">';<br></span>
</td></tr>
<tr id="sl_svn2_194"><td class="source">
 <span class="pln">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $fr = fopen($filename, "w");<br></span>
</td></tr>
---------8<------------------8<------------------8<---------

Original issue reported on code.google.com by devillsn...@gmail.com on 22 Jun 2011 at 8:06