Comments (6)
Original comment by [email protected]
on 15 Aug 2007 at 6:22
- Changed state: Accepted
from google-code-prettify.
Original comment by [email protected]
on 15 Aug 2007 at 8:43
from google-code-prettify.
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 [email protected]
on 30 Aug 2007 at 9:29
from google-code-prettify.
Actually, I'll just do it in the chunkifier.
Original comment by [email protected]
on 30 Aug 2007 at 9:32
from google-code-prettify.
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 [email protected]
on 30 Aug 2007 at 9:46
from google-code-prettify.
Closed for lack of activity.
Original comment by [email protected]
on 23 Oct 2007 at 1:20
- Changed state: WillNotFix
from google-code-prettify.
Related Issues (20)
- Perl syntax highlighting does not recognize POD and highlights quotes in comments
- Bash "$#" treated as comment HOT 1
- Integration for Presentation
- Patch for /trunk/src/lang-css.js
- "><img src=x onerror=prompt(1);> HOT 2
- Feature request: AspectJ syntax highlighting.
- gzip disabled
- Patch for /trunk/js-modules/run_prettify.js
- Patch for /trunk/src/lang-vb.js
- Line numbers carry over in clipboard using IE 11.
- Patch for /trunk/src/awkirin.css
- Problem with backslash in VB
- FLOW_CONTROL_KEYWORDS should not contain `do`
- Syntax Highlighting for Rebol (and Red) programming languages
- Patch for /trunk/styles/sons-of-obsidian.css
- Syntax highlight for Robot Framework syntax
- Patch for /trunk/src/prettify.css HOT 1
- Inconsist TCL Syntax higlighter
- Patch for /trunk/src/lang-sql.js
- Patch for /trunk/styles/sons-of-obsidian.css
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from google-code-prettify.