diff options
author | mensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f> | 2008-11-14 15:39:19 +0000 |
---|---|---|
committer | mensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f> | 2008-11-14 15:39:19 +0000 |
commit | 1c5685d68f1b73270fb814fe04cbb490eb90ba5f (patch) | |
tree | 3d3ada08a934b96fc31531f1327690d7edc6f766 /includes/js/dojox/highlight/tests/test_pygments.html | |
parent | 104d59099e048688c4dbac37d72137006e396558 (diff) | |
download | semanticscuttle-1c5685d68f1b73270fb814fe04cbb490eb90ba5f.tar.gz semanticscuttle-1c5685d68f1b73270fb814fe04cbb490eb90ba5f.tar.bz2 |
Minor fix: Remove DOJO library (60Mo) replaced by link to Google CDN (online DOJO library)
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@159 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'includes/js/dojox/highlight/tests/test_pygments.html')
-rw-r--r-- | includes/js/dojox/highlight/tests/test_pygments.html | 142 |
1 files changed, 0 insertions, 142 deletions
diff --git a/includes/js/dojox/highlight/tests/test_pygments.html b/includes/js/dojox/highlight/tests/test_pygments.html deleted file mode 100644 index 6bdced6..0000000 --- a/includes/js/dojox/highlight/tests/test_pygments.html +++ /dev/null @@ -1,142 +0,0 @@ -<!DOCTYPE html> -<html> -<head> - <title>dojox.highlight.pygments - syntax highlighting | The Dojo Toolkit</title> - <style type="text/css"> - @import "../../../dijit/tests/css/dijitTests.css"; - - /* CSS rules for debugging */ - - pre code[class]:after { - content: 'highlight: ' attr(class); - display: block; text-align: right; - font-size: smaller; - color: #CCC; background: white; - border-top: solid 1px; - padding-top: 0.5em; - } - - pre code { - display: block; - } - </style> - - <!-- a sample set of definitions to use as a foundation to color your code --> - <link rel="stylesheet" type="text/css" href="../resources/pygments/default.css" /> - - <script type="text/javascript" djConfig="parseOnLoad: true, isDebug: true" src="../../../dojo/dojo.js"></script> - <!-- - <script type="text/javascript" src="../_base.js"></script> - <script type="text/javascript" src="../languages/pygments/xml.js"></script> - <script type="text/javascript" src="../languages/pygments/html.js"></script> - <script type="text/javascript" src="../languages/pygments/css.js"></script> - <script type="text/javascript" src="../languages/pygments/javascript.js"></script> - --> - - <script type="text/javascript"> - dojo.require("dojox.highlight"); - /* - dojo.require("dojox.highlight.languages.pygments.xml"); - dojo.require("dojox.highlight.languages.pygments.html"); - dojo.require("dojox.highlight.languages.pygments.css"); - dojo.require("dojox.highlight.languages.pygments.javascript"); - */ - dojo.require("dojox.highlight.languages.pygments._www"); - dojo.require("dojo.parser"); - - dojo.addOnLoad(function(){ - var sel = dojo.byId("theme"), - sty = dojo.query("link[rel='stylesheet']", document.head)[0]; - dojo.query("option[value='default']", sel)[0].selected = "selected"; - dojo.connect(sel, "onchange", function(){ - sty.href = "../resources/pygments/" + sel.value + ".css"; - }); - }); - </script> -</head> -<body> -<h1>Test Pygments-based highlighting</h1> - -<p>Current theme from the pygments set: -<select id="theme"> - <option value="autumn">Autumn</option> - <option value="borland">Borland</option> - <option value="colorful">Colorful</option> - <option value="default">Default</option> - <option value="emacs">Emacs</option> - <option value="friendly">Friendly</option> - <option value="fruity">Fruity</option> - <option value="manni">Manni</option> - <option value="murphy">Murphy</option> - <option value="native">Native</option> - <option value="pastie">Pastie</option> - <option value="perldoc">Perldoc</option> - <option value="trac">Trac</option> -</select> -</p> - -<p>Javascript:</p> - -<pre><code dojoType="dojox.highlight.Code">function initHighlight(block) { - if (block.className.search(/\bno\-highlight\b/) != -1) - return false; - try { - blockText(block); - } catch (e) { - if (e == 'Complex markup') - return; - }//try - var classes = block.className.split(/\s+/); - for (var i = 0; i < classes.length; i++) { - if (LANGUAGES[classes[i]]) { - highlightLanguage(block, classes[i]); - return; - }//if - }//for - highlightAuto(block); -}//initHighlight</code></pre> - -<p>Some CSS code:</p> - -<pre><code dojoType="dojox.highlight.Code">body, -html { - font: Tahoma, Arial, sans-serif; -} - -#content { - width: 100%; /* test comment */ - height: 100% -} - -p[lang=ru] { - color: red; -} -</pre></code> - -<p>Some HTML code:</p> - -<pre><code dojoType="dojox.highlight.Code"><head> - <title>Title</title> -<body> - <p class="something">Something</p> - <p class=something>Something</p> - <!-- comment --> - <p class>Something</p> - <p class="something" title="p">Something</p> -</body> -</code></pre> - -<p>A custom XML document:</p> - -<pre><code dojoType="dojox.highlight.Code"><?xml version="1.0"?> -<response value="ok"> - <text>Ok</text> - <comment/> - <ns:description><![CDATA[ - CDATA is <not> magical. - ]]></ns:description> -</response> -</code></pre> - -</body> -</html> |