author | Dan |
Fri, 29 May 2009 19:30:59 -0400 | |
changeset 2 | 9e3258dfae15 |
parent 1 | c715631f809a |
child 3 | f3e2bbbd2155 |
permissions | -rwxr-xr-x |
1
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
diff
changeset
|
1 |
<?php |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
diff
changeset
|
2 |
/************************************************************************************* |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
diff
changeset
|
3 |
* html4strict.php |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
diff
changeset
|
4 |
* --------------- |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
diff
changeset
|
5 |
* Author: Nigel McNie (nigel@geshi.org) |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
diff
changeset
|
6 |
* Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter/) |
2 | 7 |
* Release Version: 1.0.8.2 |
1
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
diff
changeset
|
8 |
* Date Started: 2004/07/10 |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
diff
changeset
|
9 |
* |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
diff
changeset
|
10 |
* HTML 4.01 strict language file for GeSHi. |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
diff
changeset
|
11 |
* |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
diff
changeset
|
12 |
* CHANGES |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
diff
changeset
|
13 |
* ------- |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
diff
changeset
|
14 |
* 2005/12/28 (1.0.4) |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
diff
changeset
|
15 |
* - Removed escape character for strings |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
diff
changeset
|
16 |
* 2004/11/27 (1.0.3) |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
diff
changeset
|
17 |
* - Added support for multiple object splitters |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
diff
changeset
|
18 |
* 2004/10/27 (1.0.2) |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
diff
changeset
|
19 |
* - Added support for URLs |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
diff
changeset
|
20 |
* 2004/08/05 (1.0.1) |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
diff
changeset
|
21 |
* - Added INS and DEL |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
diff
changeset
|
22 |
* - Removed the background colour from tags' styles |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
diff
changeset
|
23 |
* 2004/07/14 (1.0.0) |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
diff
changeset
|
24 |
* - First Release |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
diff
changeset
|
25 |
* |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
diff
changeset
|
26 |
* TODO (updated 2004/11/27) |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
diff
changeset
|
27 |
* ------------------------- |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
diff
changeset
|
28 |
* * Check that only HTML4 strict attributes are highlighted |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
diff
changeset
|
29 |
* * Eliminate empty tags that aren't allowed in HTML4 strict |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
diff
changeset
|
30 |
* * Split to several files - html4trans, xhtml1 etc |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
diff
changeset
|
31 |
* |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
diff
changeset
|
32 |
************************************************************************************* |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
diff
changeset
|
33 |
* |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
diff
changeset
|
34 |
* This file is part of GeSHi. |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
diff
changeset
|
35 |
* |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
diff
changeset
|
36 |
* GeSHi is free software; you can redistribute it and/or modify |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
diff
changeset
|
37 |
* it under the terms of the GNU General Public License as published by |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
diff
changeset
|
38 |
* the Free Software Foundation; either version 2 of the License, or |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
diff
changeset
|
39 |
* (at your option) any later version. |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
diff
changeset
|
40 |
* |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
diff
changeset
|
41 |
* GeSHi is distributed in the hope that it will be useful, |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
diff
changeset
|
42 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
diff
changeset
|
43 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
diff
changeset
|
44 |
* GNU General Public License for more details. |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
diff
changeset
|
45 |
* |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
diff
changeset
|
46 |
* You should have received a copy of the GNU General Public License |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
diff
changeset
|
47 |
* along with GeSHi; if not, write to the Free Software |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
diff
changeset
|
48 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
diff
changeset
|
49 |
* |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
diff
changeset
|
50 |
************************************************************************************/ |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
diff
changeset
|
51 |
|
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
diff
changeset
|
52 |
$language_data = array ( |
2 | 53 |
'LANG_NAME' => 'HTML', |
54 |
'COMMENT_SINGLE' => array(), |
|
55 |
'COMMENT_MULTI' => array(), |
|
56 |
'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, |
|
57 |
'QUOTEMARKS' => array("'", '"'), |
|
58 |
'ESCAPE_CHAR' => '', |
|
59 |
'KEYWORDS' => array( |
|
60 |
2 => array( |
|
61 |
'a', 'abbr', 'acronym', 'address', 'applet', |
|
1
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
diff
changeset
|
62 |
|
2 | 63 |
'base', 'basefont', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'b', |
1
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
diff
changeset
|
64 |
|
2 | 65 |
'caption', 'center', 'cite', 'code', 'colgroup', 'col', |
66 |
||
67 |
'dd', 'del', 'dfn', 'dir', 'div', 'dl', 'dt', |
|
1
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
diff
changeset
|
68 |
|
2 | 69 |
'em', |
1
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
diff
changeset
|
70 |
|
2 | 71 |
'fieldset', 'font', 'form', 'frame', 'frameset', |
1
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
diff
changeset
|
72 |
|
2 | 73 |
'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'hr', 'html', |
1
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
diff
changeset
|
74 |
|
2 | 75 |
'iframe', 'ilayer', 'img', 'input', 'ins', 'isindex', 'i', |
1
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
diff
changeset
|
76 |
|
2 | 77 |
'kbd', |
1
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
diff
changeset
|
78 |
|
2 | 79 |
'label', 'legend', 'link', 'li', |
1
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
diff
changeset
|
80 |
|
2 | 81 |
'map', 'meta', |
1
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
diff
changeset
|
82 |
|
2 | 83 |
'noframes', 'noscript', |
1
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
diff
changeset
|
84 |
|
2 | 85 |
'object', 'ol', 'optgroup', 'option', |
1
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
diff
changeset
|
86 |
|
2 | 87 |
'param', 'pre', 'p', |
88 |
||
89 |
'q', |
|
1
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
diff
changeset
|
90 |
|
2 | 91 |
'samp', 'script', 'select', 'small', 'span', 'strike', 'strong', 'style', 'sub', 'sup', 's', |
1
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
diff
changeset
|
92 |
|
2 | 93 |
'table', 'tbody', 'td', 'textarea', 'text', 'tfoot', 'thead', 'th', 'title', 'tr', 'tt', |
1
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
diff
changeset
|
94 |
|
2 | 95 |
'ul', 'u', |
1
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
diff
changeset
|
96 |
|
2 | 97 |
'var', |
98 |
), |
|
99 |
3 => array( |
|
100 |
'abbr', 'accept-charset', 'accept', 'accesskey', 'action', 'align', 'alink', 'alt', 'archive', 'axis', |
|
101 |
'background', 'bgcolor', 'border', |
|
102 |
'cellpadding', 'cellspacing', 'char', 'charoff', 'charset', 'checked', 'cite', 'class', 'classid', 'clear', 'code', 'codebase', 'codetype', 'color', 'cols', 'colspan', 'compact', 'content', 'coords', |
|
103 |
'data', 'datetime', 'declare', 'defer', 'dir', 'disabled', |
|
104 |
'enctype', |
|
105 |
'face', 'for', 'frame', 'frameborder', |
|
106 |
'headers', 'height', 'href', 'hreflang', 'hspace', 'http-equiv', |
|
107 |
'id', 'ismap', |
|
108 |
'label', 'lang', 'language', 'link', 'longdesc', |
|
109 |
'marginheight', 'marginwidth', 'maxlength', 'media', 'method', 'multiple', |
|
110 |
'name', 'nohref', 'noresize', 'noshade', 'nowrap', |
|
111 |
'object', 'onblur', 'onchange', 'onclick', 'ondblclick', 'onfocus', 'onkeydown', 'onkeypress', 'onkeyup', 'onload', 'onmousedown', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'onreset', 'onselect', 'onsubmit', 'onunload', |
|
112 |
'profile', 'prompt', |
|
113 |
'readonly', 'rel', 'rev', 'rowspan', 'rows', 'rules', |
|
114 |
'scheme', 'scope', 'scrolling', 'selected', 'shape', 'size', 'span', 'src', 'standby', 'start', 'style', 'summary', |
|
115 |
'tabindex', 'target', 'text', 'title', 'type', |
|
116 |
'usemap', |
|
117 |
'valign', 'value', 'valuetype', 'version', 'vlink', 'vspace', |
|
118 |
'width' |
|
119 |
) |
|
120 |
), |
|
121 |
'SYMBOLS' => array( |
|
122 |
'/', '=' |
|
123 |
), |
|
124 |
'CASE_SENSITIVE' => array( |
|
125 |
GESHI_COMMENTS => false, |
|
126 |
2 => false, |
|
127 |
3 => false, |
|
1
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
diff
changeset
|
128 |
), |
2 | 129 |
'STYLES' => array( |
130 |
'KEYWORDS' => array( |
|
131 |
2 => 'color: #000000; font-weight: bold;', |
|
132 |
3 => 'color: #000066;' |
|
133 |
), |
|
134 |
'COMMENTS' => array( |
|
135 |
), |
|
136 |
'ESCAPE_CHAR' => array( |
|
137 |
0 => 'color: #000099; font-weight: bold;' |
|
138 |
), |
|
139 |
'BRACKETS' => array( |
|
140 |
0 => 'color: #66cc66;' |
|
141 |
), |
|
142 |
'STRINGS' => array( |
|
143 |
0 => 'color: #ff0000;' |
|
144 |
), |
|
145 |
'NUMBERS' => array( |
|
146 |
0 => 'color: #cc66cc;' |
|
147 |
), |
|
148 |
'METHODS' => array( |
|
149 |
), |
|
150 |
'SYMBOLS' => array( |
|
151 |
0 => 'color: #66cc66;' |
|
152 |
), |
|
153 |
'SCRIPT' => array( |
|
154 |
-1 => 'color: #808080; font-style: italic;', // comments |
|
155 |
0 => 'color: #00bbdd;', |
|
156 |
1 => 'color: #ddbb00;', |
|
157 |
2 => 'color: #009900;' |
|
158 |
), |
|
159 |
'REGEXPS' => array( |
|
160 |
) |
|
161 |
), |
|
162 |
'URLS' => array( |
|
163 |
2 => 'http://december.com/html/4/element/{FNAMEL}.html', |
|
164 |
3 => '' |
|
165 |
), |
|
166 |
'OOLANG' => false, |
|
167 |
'OBJECT_SPLITTERS' => array( |
|
168 |
), |
|
169 |
'REGEXPS' => array( |
|
170 |
), |
|
171 |
'STRICT_MODE_APPLIES' => GESHI_ALWAYS, |
|
172 |
'SCRIPT_DELIMITERS' => array( |
|
173 |
-1 => array( |
|
174 |
'<!--' => '-->' |
|
175 |
), |
|
176 |
0 => array( |
|
177 |
'<!DOCTYPE' => '>' |
|
178 |
), |
|
179 |
1 => array( |
|
180 |
'&' => ';' |
|
181 |
), |
|
182 |
2 => array( |
|
183 |
'<' => '>' |
|
184 |
) |
|
185 |
), |
|
186 |
'HIGHLIGHT_STRICT_BLOCK' => array( |
|
187 |
-1 => false, |
|
188 |
0 => false, |
|
189 |
1 => false, |
|
190 |
2 => true |
|
191 |
), |
|
192 |
'TAB_WIDTH' => 4, |
|
193 |
'PARSER_CONTROL' => array( |
|
194 |
'KEYWORDS' => array( |
|
195 |
2 => array( |
|
196 |
'DISALLOWED_BEFORE' => '(?<=<|<\/)', |
|
197 |
'DISALLOWED_AFTER' => '(?=\s|\/|>)', |
|
198 |
) |
|
199 |
) |
|
200 |
) |
|
1
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
diff
changeset
|
201 |
); |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
diff
changeset
|
202 |
|
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
diff
changeset
|
203 |
?> |