1<?php
2/*************************************************************************************
3 * html5.php
4 * ---------------
5 * Author: Nigel McNie (nigel@geshi.org)
6 * Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter/)
7 * Release Version: 1.0.9.1
8 * Date Started: 2004/07/10
9 *
10 * HTML 5 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' => 'HTML5',
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', 'address', 'article', 'area', 'aside', 'audio',
62
63            'base', 'bdo', 'blockquote', 'body', 'br', 'button', 'b',
64
65            'caption', 'cite', 'code', 'colgroup', 'col', 'canvas', 'command', 'datalist', 'details',
66
67            'dd', 'del', 'dfn', 'div', 'dl', 'dt',
68
69            'em', 'embed',
70
71            'fieldset', 'form', 'figcaption', 'figure', 'footer',
72
73            'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'hr', 'html', 'header', 'hgroup',
74
75            'iframe', 'ilayer', 'img', 'input', 'ins', 'isindex', 'i',
76
77            'kbd', 'keygen',
78
79            'label', 'legend', 'link', 'li',
80
81            'map', 'meta', 'mark', 'meter',
82
83            'noscript', 'nav',
84
85            'object', 'ol', 'optgroup', 'option', 'output',
86
87            'param', 'pre', 'p', 'progress',
88
89            'q',
90
91            'rp', 'rt', 'ruby',
92
93            'samp', 'script', 'select', 'small', 'span', 'strong', 'style', 'sub', 'sup', 's', 'section', 'source', 'summary',
94
95            'table', 'tbody', 'td', 'textarea', 'text', 'tfoot', 'thead', 'th', 'title', 'tr', 'time',
96
97            'ul',
98
99            'var', 'video',
100
101            'wbr',
102            ),
103        3 => array(
104            'abbr', 'accept-charset', 'accept', 'accesskey', 'action', 'align', 'alink', 'alt', 'archive', 'axis', 'autocomplete', 'autofocus',
105            'background', 'bgcolor', 'border',
106            'cellpadding', 'cellspacing', 'char', 'charoff', 'charset', 'checked', 'cite', 'class', 'classid', 'clear', 'code', 'codebase', 'codetype', 'color', 'cols', 'colspan', 'compact', 'content', 'coords', 'contenteditable', 'contextmenu',
107            'data', 'datetime', 'declare', 'defer', 'dir', 'disabled', 'draggable', 'dropzone',
108            'enctype',
109            'face', 'for', 'frame', 'frameborder', 'form', 'formaction', 'formenctype', 'formmethod', 'formnovalidate', 'formtarget',
110            'headers', 'height', 'href', 'hreflang', 'hspace', 'http-equiv', 'hidden',
111            'id', 'ismap',
112            'label', 'lang', 'language', 'link', 'longdesc',
113            'marginheight', 'marginwidth', 'maxlength', 'media', 'method', 'multiple', 'min', 'max',
114            'name', 'nohref', 'noresize', 'noshade', 'nowrap', 'novalidate',
115            'object', 'onblur', 'onchange', 'onclick', 'ondblclick', 'onfocus', 'onkeydown', 'onkeypress', 'onkeyup', 'onload', 'onmousedown', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'onselect', 'onsubmit', 'onunload', 'onafterprint', 'onbeforeprint', 'onbeforeonload', 'onerror', 'onhaschange', 'onmessage', 'onoffline', 'ononline', 'onpagehide', 'onpageshow', 'onpopstate', 'onredo', 'onresize', 'onstorage', 'onundo', 'oncontextmenu', 'onformchange', 'onforminput', 'oninput', 'oninvalid', 'ondrag', 'ondragend', 'ondragenter', 'ondragleave', 'ondragover', 'ondragstart', 'ondrop', 'onmousewheel', 'onscroll', 'oncanplay', 'oncanplaythrough', 'ondurationchange', 'onemptied', 'onended', 'onloadeddata', 'onloadedmetadata', 'onloadstart', 'onpause', 'onplay', 'onplaying', 'onprogress', 'onratechange', 'onreadystatechange', 'onseeked', 'onseeking', 'onstalled', 'onsuspend', 'ontimeupdate', 'onvolumechange', 'onwaiting',
116            'profile', 'prompt', 'pattern', 'placeholder',
117            'readonly', 'rel', 'rev', 'rowspan', 'rows', 'rules', 'required',
118            'scheme', 'scope', 'scrolling', 'selected', 'shape', 'size', 'span', 'src', 'standby', 'start', 'style', 'summary', 'spellcheck', 'step',
119            'tabindex', 'target', 'text', 'title', 'type',
120            'usemap',
121            'valign', 'value', 'valuetype', 'version', 'vlink', 'vspace',
122            'width'
123            )
124        ),
125    'SYMBOLS' => array(
126        '/', '='
127        ),
128    'CASE_SENSITIVE' => array(
129        GESHI_COMMENTS => false,
130        2 => false,
131        3 => false,
132        ),
133    'STYLES' => array(
134        'KEYWORDS' => array(
135            2 => 'color: #000000; font-weight: bold;',
136            3 => 'color: #000066;'
137            ),
138        'COMMENTS' => array(
139            ),
140        'ESCAPE_CHAR' => array(
141            0 => 'color: #000099; font-weight: bold;'
142            ),
143        'BRACKETS' => array(
144            0 => 'color: #66cc66;'
145            ),
146        'STRINGS' => array(
147            0 => 'color: #ff0000;'
148            ),
149        'NUMBERS' => array(
150            0 => 'color: #cc66cc;'
151            ),
152        'METHODS' => array(
153            ),
154        'SYMBOLS' => array(
155            0 => 'color: #66cc66;'
156            ),
157        'SCRIPT' => array(
158            -2 => 'color: #404040;', // CDATA
159            -1 => 'color: #808080; font-style: italic;', // comments
160            0 => 'color: #00bbdd;',
161            1 => 'color: #ddbb00;',
162            2 => 'color: #009900;'
163            ),
164        'REGEXPS' => array(
165            )
166        ),
167    'URLS' => array(
168        2 => 'http://december.com/html/4/element/{FNAMEL}.html',
169        3 => ''
170        ),
171    'OOLANG' => false,
172    'OBJECT_SPLITTERS' => array(
173        ),
174    'REGEXPS' => array(
175        ),
176    'STRICT_MODE_APPLIES' => GESHI_ALWAYS,
177    'SCRIPT_DELIMITERS' => array(
178        -2 => array(
179            '<![CDATA[' => ']]>'
180            ),
181        -1 => array(
182            '<!--' => '-->'
183            ),
184        0 => array(
185            '<!DOCTYPE' => '>'
186            ),
187        1 => array(
188            '&' => ';'
189            ),
190        2 => array(
191            '<' => '>'
192            )
193    ),
194    'HIGHLIGHT_STRICT_BLOCK' => array(
195        -2 => false,
196        -1 => false,
197        0 => false,
198        1 => false,
199        2 => true
200        ),
201    'TAB_WIDTH' => 4,
202    'PARSER_CONTROL' => array(
203        'KEYWORDS' => array(
204            2 => array(
205                'DISALLOWED_BEFORE' => '(?<=&lt;|&lt;\/)',
206                'DISALLOWED_AFTER' => '(?=\s|\/|&gt;)',
207            )
208        )
209    )
210);
211