Closed GoogleCodeExporter closed 9 years ago
Original comment by mikesamuel@gmail.com
on 15 Aug 2007 at 6:22
Original comment by mikesamuel@gmail.com
on 15 Aug 2007 at 8:43
Thanks for the testcase.
The lexer treats the chunk as markup if the first non-whitespace character is
'<'.
Since "<![CDATA[" starts with '<' it's getting confused.
I will change the splitSourceNodes pass to force non markup lexing.
Original comment by mikesamuel@gmail.com
on 30 Aug 2007 at 9:29
Actually, I'll just do it in the chunkifier.
Original comment by mikesamuel@gmail.com
on 30 Aug 2007 at 9:32
I tested, and
<pre class="prettyprint">
<script><![CDATA[
mySourceDoe();
]]></script>
works properly.
In the testPrettify.html example though:
<pre class="prettyprint"><![CDATA[
/**
* @method isPrettyGood
* This is a test.
* @param foo {String} is it a "bar" string?
* function returns a new this. document is open for each class.
*/
isPrettyGood = function isPrettyGood(/* string*/foo ) {
var x = new String( "poop" );
// first char is "p".
var p = x.charAt( 0 );
var p = new Poop( p );
var t = new this( s );
};
]]>
<!-- foo html comment function -->
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
</pre>
What do you expect to happen?
It looks like the content is markup, and should be parsed as such. The CDATA
section
is a text node, not something that a browser would treat as javascript, so what
indicator is there that it should be treated as javascript?
Original comment by mikesamuel@gmail.com
on 30 Aug 2007 at 9:46
Closed for lack of activity.
Original comment by mikesamuel@gmail.com
on 23 Oct 2007 at 1:20
Original issue reported on code.google.com by
dhtmlkit...@gmail.com
on 22 May 2007 at 3:54Attachments: