1 | 1 | simandl | <?php |
2 | | | /************************************************************************************* |
3 | | | * html4strict.php |
4 | | | * --------------- |
5 | | | * Author: Nigel McNie (nigel@geshi.org) |
6 | | | * Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter/) |
7 | | | * Release Version: 1.0.8.1 |
8 | | | * Date Started: 2004/07/10 |
9 | | | * |
10 | | | * HTML 4.01 strict language file for GeSHi. |
11 | | | * |
12 | | | * CHANGES |
13 | | | * ------- |
14 | | | * 2005/12/28 (1.0.4) |
15 | | | * - Removed escape character for strings |
16 | | | * 2004/11/27 (1.0.3) |
17 | | | * - Added support for multiple object splitters |
18 | | | * 2004/10/27 (1.0.2) |
19 | | | * - Added support for URLs |
20 | | | * 2004/08/05 (1.0.1) |
21 | | | * - Added INS and DEL |
22 | | | * - Removed the background colour from tags' styles |
23 | | | * 2004/07/14 (1.0.0) |
24 | | | * - First Release |
25 | | | * |
26 | | | * TODO (updated 2004/11/27) |
27 | | | * ------------------------- |
28 | | | * * Check that only HTML4 strict attributes are highlighted |
29 | | | * * Eliminate empty tags that aren't allowed in HTML4 strict |
30 | | | * * Split to several files - html4trans, xhtml1 etc |
31 | | | * |
32 | | | ************************************************************************************* |
33 | | | * |
34 | | | * This file is part of GeSHi. |
35 | | | * |
36 | | | * GeSHi is free software; you can redistribute it and/or modify |
37 | | | * it under the terms of the GNU General Public License as published by |
38 | | | * the Free Software Foundation; either version 2 of the License, or |
39 | | | * (at your option) any later version. |
40 | | | * |
41 | | | * GeSHi is distributed in the hope that it will be useful, |
42 | | | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
43 | | | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
44 | | | * GNU General Public License for more details. |
45 | | | * |
46 | | | * You should have received a copy of the GNU General Public License |
47 | | | * along with GeSHi; if not, write to the Free Software |
48 | | | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
49 | | | * |
50 | | | ************************************************************************************/ |
51 | | | |
52 | | | $language_data = array ( |
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', |
62 | | | |
63 | | | 'base', 'basefont', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'b', |
64 | | | |
65 | | | 'caption', 'center', 'cite', 'code', 'colgroup', 'col', |
66 | | | |
67 | | | 'dd', 'del', 'dfn', 'dir', 'div', 'dl', 'dt', |
68 | | | |
69 | | | 'em', |
70 | | | |
71 | | | 'fieldset', 'font', 'form', 'frame', 'frameset', |
72 | | | |
73 | | | 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'hr', 'html', |
74 | | | |
75 | | | 'iframe', 'ilayer', 'img', 'input', 'ins', 'isindex', 'i', |
76 | | | |
77 | | | 'kbd', |
78 | | | |
79 | | | 'label', 'legend', 'link', 'li', |
80 | | | |
81 | | | 'map', 'meta', |
82 | | | |
83 | | | 'noframes', 'noscript', |
84 | | | |
85 | | | 'object', 'ol', 'optgroup', 'option', |
86 | | | |
87 | | | 'param', 'pre', 'p', |
88 | | | |
89 | | | 'q', |
90 | | | |
91 | | | 'samp', 'script', 'select', 'small', 'span', 'strike', 'strong', 'style', 'sub', 'sup', 's', |
92 | | | |
93 | | | 'table', 'tbody', 'td', 'textarea', 'text', 'tfoot', 'thead', 'th', 'title', 'tr', 'tt', |
94 | | | |
95 | | | 'ul', 'u', |
96 | | | |
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, |
128 | | | ), |
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 | | | |
138 | | | ), |
139 | | | 'BRACKETS' => array( |
140 | | | |
141 | | | ), |
142 | | | 'STRINGS' => array( |
143 | | | |
144 | | | ), |
145 | | | 'NUMBERS' => array( |
146 | | | |
147 | | | ), |
148 | | | 'METHODS' => array( |
149 | | | ), |
150 | | | 'SYMBOLS' => array( |
151 | | | |
152 | | | ), |
153 | | | 'SCRIPT' => array( |
154 | | | -1 => 'color: #808080; font-style: italic;', // comments |
155 | | | |
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 | | | |
177 | | | '<!DOCTYPE' => '>' |
178 | | | ), |
179 | | | 1 => array( |
180 | | | '&' => ';' |
181 | | | ), |
182 | | | 2 => array( |
183 | | | '<' => '>' |
184 | | | ) |
185 | | | ), |
186 | | | 'HIGHLIGHT_STRICT_BLOCK' => array( |
187 | | | -1 => false, |
188 | | | |
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 | | | ) |
201 | | | ); |
202 | | | |
203 | | | ?> |