Project

General

Profile

Statistics
| Revision:

root / trunk / web / dojo / dojox / highlight / languages / pygments / html.js

History | View | Annotate | Download (1.59 KB)

1
/*
2
        Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
3
        Available via Academic Free License >= 2.1 OR the modified BSD license.
4
        see: http://dojotoolkit.org/license for details
5
*/
6

    
7

    
8
if(!dojo._hasResource["dojox.highlight.languages.pygments.html"]){
9
dojo._hasResource["dojox.highlight.languages.pygments.html"]=true;
10
dojo.provide("dojox.highlight.languages.pygments.html");
11
dojo.require("dojox.highlight._base");
12
dojo.require("dojox.highlight.languages.pygments._html");
13
(function(){
14
var dh=dojox.highlight,_1=dh.languages,_2=[],ht=_1.pygments._html.tags;
15
for(var _3 in ht){
16
_2.push(_3);
17
}
18
_2="\\b("+_2.join("|")+")\\b";
19
_1.html={case_insensitive:true,defaultMode:{contains:["name entity","comment","comment preproc","_script","_style","_tag"]},modes:[{className:"comment",begin:"<!--",end:"-->"},{className:"comment preproc",begin:"\\<\\!\\[CDATA\\[",end:"\\]\\]\\>"},{className:"comment preproc",begin:"\\<\\!",end:"\\>"},{className:"string",begin:"'",end:"'",illegal:"\\n",relevance:0},{className:"string",begin:"\"",end:"\"",illegal:"\\n",relevance:0},{className:"name entity",begin:"\\&[a-z]+;",end:"^"},{className:"name tag",begin:_2,end:"^",relevance:5},{className:"name attribute",begin:"\\b[a-z0-9_\\:\\-]+\\s*=",end:"^",relevance:0},{className:"_script",begin:"\\<script\\b",end:"\\</script\\>",relevance:5},{className:"_style",begin:"\\<style\\b",end:"\\</style\\>",relevance:5},{className:"_tag",begin:"\\<(?!/)",end:"\\>",contains:["name tag","name attribute","string","_value"]},{className:"_tag",begin:"\\</",end:"\\>",contains:["name tag"]},{className:"_value",begin:"[^\\s\\>]+",end:"^"}]};
20
})();
21
}