plugins/geshi/geshi/html.php
changeset 2 9e3258dfae15
parent 1 c715631f809a
child 3 f3e2bbbd2155
equal deleted inserted replaced
1:c715631f809a 2:9e3258dfae15
     2 /*************************************************************************************
     2 /*************************************************************************************
     3  * html4strict.php
     3  * html4strict.php
     4  * ---------------
     4  * ---------------
     5  * Author: Nigel McNie (nigel@geshi.org)
     5  * Author: Nigel McNie (nigel@geshi.org)
     6  * Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter/)
     6  * Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter/)
     7  * Release Version: 1.0.7.20
     7  * Release Version: 1.0.8.2
     8  * Date Started: 2004/07/10
     8  * Date Started: 2004/07/10
     9  *
     9  *
    10  * HTML 4.01 strict language file for GeSHi.
    10  * HTML 4.01 strict language file for GeSHi.
    11  *
    11  *
    12  * CHANGES
    12  * CHANGES
    48  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    48  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    49  *
    49  *
    50  ************************************************************************************/
    50  ************************************************************************************/
    51 
    51 
    52 $language_data = array (
    52 $language_data = array (
    53 	'LANG_NAME' => 'HTML',
    53     'LANG_NAME' => 'HTML',
    54 	'COMMENT_SINGLE' => array(),
    54     'COMMENT_SINGLE' => array(),
    55 	'COMMENT_MULTI' => array('<!--' => '-->'),
    55     'COMMENT_MULTI' => array(),
    56 	'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
    56     'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
    57 	'QUOTEMARKS' => array("'", '"'),
    57     'QUOTEMARKS' => array("'", '"'),
    58 	'ESCAPE_CHAR' => '',
    58     'ESCAPE_CHAR' => '',
    59 	'KEYWORDS' => array(
    59     'KEYWORDS' => array(
    60 		1 => array(
    60         2 => array(
    61 			),
    61             'a', 'abbr', 'acronym', 'address', 'applet',
    62 		2 => array(
    62 
    63 			'&lt;a&gt;', '&lt;abbr&gt;', '&lt;acronym&gt;', '&lt;address&gt;', '&lt;applet&gt;',
    63             'base', 'basefont', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'b',
    64 			'&lt;a', '&lt;abbr', '&lt;acronym', '&lt;address', '&lt;applet',
    64 
    65 			'&lt;/a&gt;', '&lt;/abbr&gt;', '&lt;/acronym&gt;', '&lt;/address&gt;', '&lt;/applet&gt;',
    65             'caption', 'center', 'cite', 'code', 'colgroup', 'col',
    66 			'&lt;/a', '&lt;/abbr', '&lt;/acronym', '&lt;/address', '&lt;/applet',
    66 
    67 
    67             'dd', 'del', 'dfn', 'dir', 'div', 'dl', 'dt',
    68 			'&lt;base&gt;', '&lt;basefont&gt;', '&lt;bdo&gt;', '&lt;big&gt;', '&lt;blockquote&gt;', '&lt;body&gt;', '&lt;br&gt;', '&lt;button&gt;', '&lt;b&gt;',
    68 
    69 			'&lt;base', '&lt;basefont', '&lt;bdo', '&lt;big', '&lt;blockquote', '&lt;body', '&lt;br', '&lt;button', '&lt;b',
    69             'em',
    70 			'&lt;/base&gt;', '&lt;/basefont&gt;', '&lt;/bdo&gt;', '&lt;/big&gt;', '&lt;/blockquote&gt;', '&lt;/body&gt;', '&lt;/br&gt;', '&lt;/button&gt;', '&lt;/b&gt;',
    70 
    71 			'&lt;/base', '&lt;/basefont', '&lt;/bdo', '&lt;/big', '&lt;/blockquote', '&lt;/body', '&lt;/br', '&lt;/button', '&lt;/b',
    71             'fieldset', 'font', 'form', 'frame', 'frameset',
    72 
    72 
    73 			'&lt;caption&gt;', '&lt;center&gt;', '&lt;cite&gt;', '&lt;code&gt;', '&lt;colgroup&gt;', '&lt;col&gt;',
    73             'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'hr', 'html',
    74 			'&lt;caption', '&lt;center', '&lt;cite', '&lt;code', '&lt;colgroup', '&lt;col',
    74 
    75 			'&lt;/caption&gt;', '&lt;/center&gt;', '&lt;/cite&gt;', '&lt;/code&gt;', '&lt;/colgroup&gt;', '&lt;/col&gt;',
    75             'iframe', 'ilayer', 'img', 'input', 'ins', 'isindex', 'i',
    76 			'&lt;/caption', '&lt;/center', '&lt;/cite', '&lt;/code', '&lt;/colgroup', '&lt;/col',
    76 
    77 
    77             'kbd',
    78 			'&lt;dd&gt;', '&lt;del&gt;', '&lt;dfn&gt;', '&lt;dir&gt;', '&lt;div&gt;', '&lt;dl&gt;', '&lt;dt&gt;',
    78 
    79 			'&lt;dd', '&lt;del', '&lt;dfn', '&lt;dir', '&lt;div', '&lt;dl', '&lt;dt',
    79             'label', 'legend', 'link', 'li',
    80 			'&lt;/dd&gt;', '&lt;/del&gt;', '&lt;/dfn&gt;', '&lt;/dir&gt;', '&lt;/div&gt;', '&lt;/dl&gt;', '&lt;/dt&gt;',
    80 
    81 			'&lt;/dd', '&lt;/del', '&lt;/dfn', '&lt;/dir', '&lt;/div', '&lt;/dl', '&lt;/dt',
    81             'map', 'meta',
    82 
    82 
    83 			'&lt;em&gt;',
    83             'noframes', 'noscript',
    84 			'&lt;em',
    84 
    85 			'&lt;/em&gt;',
    85             'object', 'ol', 'optgroup', 'option',
    86 			'&lt;/em',
    86 
    87 
    87             'param', 'pre', 'p',
    88 			'&lt;fieldset&gt;', '&lt;font&gt;', '&lt;form&gt;', '&lt;frame&gt;', '&lt;frameset&gt;',
    88 
    89 			'&lt;fieldset', '&lt;font', '&lt;form', '&lt;frame', '&lt;frameset',
    89             'q',
    90 			'&lt;/fieldset&gt;', '&lt;/font&gt;', '&lt;/form&gt;', '&lt;/frame&gt;', '&lt;/frameset&gt;',
    90 
    91 			'&lt;/fieldset', '&lt;/font', '&lt;/form', '&lt;/frame', '&lt;/frameset',
    91             'samp', 'script', 'select', 'small', 'span', 'strike', 'strong', 'style', 'sub', 'sup', 's',
    92 
    92 
    93 			'&lt;h1&gt;', '&lt;h2&gt;', '&lt;h3&gt;', '&lt;h4&gt;', '&lt;h5&gt;', '&lt;h6&gt;', '&lt;head&gt;', '&lt;hr&gt;', '&lt;html&gt;',
    93             'table', 'tbody', 'td', 'textarea', 'text', 'tfoot', 'thead', 'th', 'title', 'tr', 'tt',
    94 			'&lt;h1', '&lt;h2', '&lt;h3', '&lt;h4', '&lt;h5', '&lt;h6', '&lt;head', '&lt;hr', '&lt;html',
    94 
    95 			'&lt;/h1&gt;', '&lt;/h2&gt;', '&lt;/h3&gt;', '&lt;/h4&gt;', '&lt;/h5&gt;', '&lt;/h6&gt;', '&lt;/head&gt;', '&lt;/hr&gt;', '&lt;/html&gt;',
    95             'ul', 'u',
    96 			'&lt;/h1', '&lt;/h2', '&lt;/h3', '&lt;/h4', '&lt;/h5', '&lt;/h6', '&lt;/head', '&lt;/hr', '&lt;/html',
    96 
    97 
    97             'var',
    98 			'&lt;iframe&gt;', '&lt;ilayer&gt;', '&lt;img&gt;', '&lt;input&gt;', '&lt;ins&gt;', '&lt;isindex&gt;', '&lt;i&gt;',
    98             ),
    99 			'&lt;iframe', '&lt;ilayer', '&lt;img', '&lt;input', '&lt;ins', '&lt;isindex', '&lt;i',
    99         3 => array(
   100 			'&lt;/iframe&gt;', '&lt;/ilayer&gt;', '&lt;/img&gt;', '&lt;/input&gt;', '&lt;/ins&gt;', '&lt;/isindex&gt;', '&lt;/i&gt;',
   100             'abbr', 'accept-charset', 'accept', 'accesskey', 'action', 'align', 'alink', 'alt', 'archive', 'axis',
   101 			'&lt;/iframe', '&lt;/ilayer', '&lt;/img', '&lt;/input', '&lt;/ins', '&lt;/isindex', '&lt;/i',
   101             'background', 'bgcolor', 'border',
   102 
   102             'cellpadding', 'cellspacing', 'char', 'charoff', 'charset', 'checked', 'cite', 'class', 'classid', 'clear', 'code', 'codebase', 'codetype', 'color', 'cols', 'colspan', 'compact', 'content', 'coords',
   103 			'&lt;kbd&gt;',
   103             'data', 'datetime', 'declare', 'defer', 'dir', 'disabled',
   104 			'&lt;kbd',
   104             'enctype',
   105 			'&t;/kbd&gt;',
   105             'face', 'for', 'frame', 'frameborder',
   106 			'&lt;/kbd',
   106             'headers', 'height', 'href', 'hreflang', 'hspace', 'http-equiv',
   107 
   107             'id', 'ismap',
   108 			'&lt;label&gt;', '&lt;legend&gt;', '&lt;link&gt;', '&lt;li&gt;',
   108             'label', 'lang', 'language', 'link', 'longdesc',
   109 			'&lt;label', '&lt;legend', '&lt;link', '&lt;li',
   109             'marginheight', 'marginwidth', 'maxlength', 'media', 'method', 'multiple',
   110 			'&lt;/label&gt;', '&lt;/legend&gt;', '&lt;/link&gt;', '&lt;/li&gt;',
   110             'name', 'nohref', 'noresize', 'noshade', 'nowrap',
   111 			'&lt;/label', '&lt;/legend', '&lt;/link', '&lt;/li',
   111             'object', 'onblur', 'onchange', 'onclick', 'ondblclick', 'onfocus', 'onkeydown', 'onkeypress', 'onkeyup', 'onload', 'onmousedown', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'onreset', 'onselect', 'onsubmit', 'onunload',
   112 
   112             'profile', 'prompt',
   113 			'&lt;map&gt;', '&lt;meta&gt;',
   113             'readonly', 'rel', 'rev', 'rowspan', 'rows', 'rules',
   114 			'&lt;map', '&lt;meta',
   114             'scheme', 'scope', 'scrolling', 'selected', 'shape', 'size', 'span', 'src', 'standby', 'start', 'style', 'summary',
   115 			'&lt;/map&gt;', '&lt;/meta&gt;',
   115             'tabindex', 'target', 'text', 'title', 'type',
   116 			'&lt;/map', '&lt;/meta',
   116             'usemap',
   117 
   117             'valign', 'value', 'valuetype', 'version', 'vlink', 'vspace',
   118 			'&lt;noframes&gt;', '&lt;noscript&gt;',
   118             'width'
   119 			'&lt;noframes', '&lt;noscript',
   119             )
   120 			'&lt;/noframes&gt;', '&lt;/noscript&gt;',
   120         ),
   121 			'&lt;/noframes', '&lt;/noscript',
   121     'SYMBOLS' => array(
   122 
   122         '/', '='
   123 			'&lt;object&gt;', '&lt;ol&gt;', '&lt;optgroup&gt;', '&lt;option&gt;',
   123         ),
   124 			'&lt;object', '&lt;ol', '&lt;optgroup', '&lt;option',
   124     'CASE_SENSITIVE' => array(
   125 			'&lt;/object&gt;', '&lt;/ol&gt;', '&lt;/optgroup&gt;', '&lt;/option&gt;',
   125         GESHI_COMMENTS => false,
   126 			'&lt;/object', '&lt;/ol', '&lt;/optgroup', '&lt;/option',
   126         2 => false,
   127 
   127         3 => false,
   128 			'&lt;param&gt;', '&lt;pre&gt;', '&lt;p&gt;',
   128         ),
   129 			'&lt;param', '&lt;pre', '&lt;p',
   129     'STYLES' => array(
   130 			'&lt;/param&gt;', '&lt;/pre&gt;', '&lt;/p&gt;',
   130         'KEYWORDS' => array(
   131 			'&lt;/param', '&lt;/pre', '&lt;/p',
   131             2 => 'color: #000000; font-weight: bold;',
   132 
   132             3 => 'color: #000066;'
   133 			'&lt;q&gt;',
   133             ),
   134 			'&lt;q',
   134         'COMMENTS' => array(
   135 			'&lt;/q&gt;',
   135             ),
   136 			'&lt;/q',
   136         'ESCAPE_CHAR' => array(
   137 
   137             0 => 'color: #000099; font-weight: bold;'
   138 			'&lt;samp&gt;', '&lt;script&gt;', '&lt;select&gt;', '&lt;small&gt;', '&lt;span&gt;', '&lt;strike&gt;', '&lt;strong&gt;', '&lt;style&gt;', '&lt;sub&gt;', '&lt;sup&gt;', '&lt;s&gt;',
   138             ),
   139 			'&lt;samp', '&lt;script', '&lt;select', '&lt;small', '&lt;span', '&lt;strike', '&lt;strong', '&lt;style', '&lt;sub', '&lt;sup', '&lt;s',
   139         'BRACKETS' => array(
   140 			'&lt;/samp&gt;', '&lt;/script&gt;', '&lt;/select&gt;', '&lt;/small&gt;', '&lt;/span&gt;', '&lt;/strike&gt;', '&lt;/strong&gt;', '&lt;/style&gt;', '&lt;/sub&gt;', '&lt;/sup&gt;', '&lt;/s&gt;',
   140             0 => 'color: #66cc66;'
   141 			'&lt;/samp', '&lt;/script', '&lt;/select', '&lt;/small', '&lt;/span', '&lt;/strike', '&lt;/strong', '&lt;/style', '&lt;/sub', '&lt;/sup', '&lt;/s',
   141             ),
   142 
   142         'STRINGS' => array(
   143 			'&lt;table&gt;', '&lt;tbody&gt;', '&lt;td&gt;', '&lt;textarea&gt;', '&lt;text&gt;', '&lt;tfoot&gt;', '&lt;thead&gt;', '&lt;th&gt;', '&lt;title&gt;', '&lt;tr&gt;', '&lt;tt&gt;',
   143             0 => 'color: #ff0000;'
   144 			'&lt;table', '&lt;tbody', '&lt;td', '&lt;textarea', '&lt;text', '&lt;tfoot', '&lt;tfoot', '&lt;thead', '&lt;th', '&lt;title', '&lt;tr', '&lt;tt',
   144             ),
   145 			'&lt;/table&gt;', '&lt;/tbody&gt;', '&lt;/td&gt;', '&lt;/textarea&gt;', '&lt;/text&gt;', '&lt;/tfoot&gt;', '&lt;/thead', '&lt;/tfoot', '&lt;/th&gt;', '&lt;/title&gt;', '&lt;/tr&gt;', '&lt;/tt&gt;',
   145         'NUMBERS' => array(
   146 			'&lt;/table', '&lt;/tbody', '&lt;/td', '&lt;/textarea', '&lt;/text', '&lt;/tfoot', '&lt;/tfoot', '&lt;/thead', '&lt;/th', '&lt;/title', '&lt;/tr', '&lt;/tt',
   146             0 => 'color: #cc66cc;'
   147 
   147             ),
   148 			'&lt;ul&gt;', '&lt;u&gt;',
   148         'METHODS' => array(
   149 			'&lt;ul', '&lt;u',
   149             ),
   150 			'&lt;/ul&gt;', '&lt;/ul&gt;',
   150         'SYMBOLS' => array(
   151 			'&lt;/ul', '&lt;/u',
   151             0 => 'color: #66cc66;'
   152 
   152             ),
   153 			'&lt;var&gt;',
   153         'SCRIPT' => array(
   154 			'&lt;var',
   154             -1 => 'color: #808080; font-style: italic;', // comments
   155 			'&lt;/var&gt;',
   155             0 => 'color: #00bbdd;',
   156 			'&lt;/var',
   156             1 => 'color: #ddbb00;',
   157 
   157             2 => 'color: #009900;'
   158 			'&gt;', '&lt;'
   158             ),
   159 			),
   159         'REGEXPS' => array(
   160 		3 => array(
   160             )
   161 			'abbr', 'accept-charset', 'accept', 'accesskey', 'action', 'align', 'alink', 'alt', 'archive', 'axis',
   161         ),
   162 			'background', 'bgcolor', 'border',
   162     'URLS' => array(
   163 			'cellpadding', 'cellspacing', 'char', 'char', 'charoff', 'charset', 'checked', 'cite', 'class', 'classid', 'clear', 'code', 'codebase', 'codetype', 'color', 'cols', 'colspan', 'compact', 'content', 'coords',
   163         2 => 'http://december.com/html/4/element/{FNAMEL}.html',
   164 			'data', 'datetime', 'declare', 'defer', 'dir', 'disabled',
   164         3 => ''
   165 			'enctype',
   165         ),
   166 			'face', 'for', 'frame', 'frameborder',
   166     'OOLANG' => false,
   167 			'headers', 'height', 'href', 'hreflang', 'hspace', 'http-equiv',
   167     'OBJECT_SPLITTERS' => array(
   168 			'id', 'ismap',
   168         ),
   169 			'label', 'lang', 'language', 'link', 'longdesc',
   169     'REGEXPS' => array(
   170 			'marginheight', 'marginwidth', 'maxlength', 'media', 'method', 'multiple',
   170         ),
   171 			'name', 'nohref', 'noresize', 'noshade', 'nowrap',
   171     'STRICT_MODE_APPLIES' => GESHI_ALWAYS,
   172 			'object', 'onblur', 'onchange', 'onclick', 'ondblclick', 'onfocus', 'onkeydown', 'onkeypress', 'onkeyup', 'onload', 'onmousedown', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'onreset', 'onselect', 'onsubmit', 'onunload',
   172     'SCRIPT_DELIMITERS' => array(
   173 			'profile', 'prompt',
   173         -1 => array(
   174 			'readonly', 'rel', 'rev', 'rowspan', 'rows', 'rules',
   174             '<!--' => '-->'
   175 			'scheme', 'scope', 'scrolling', 'selected', 'shape', 'size', 'span', 'src', 'standby', 'start', 'style', 'summary',
   175             ),
   176 			'tabindex', 'target', 'text', 'title', 'type',
   176         0 => array(
   177 			'usemap',
   177             '<!DOCTYPE' => '>'
   178 			'valign', 'value', 'valuetype', 'version', 'vlink', 'vspace',
   178             ),
   179 			'width'
   179         1 => array(
   180 			)
   180             '&' => ';'
   181 		),
   181             ),
   182 	'SYMBOLS' => array(
   182         2 => array(
   183 		'/', '='
   183             '<' => '>'
   184 		),
   184             )
   185 	'CASE_SENSITIVE' => array(
   185     ),
   186 		GESHI_COMMENTS => false,
   186     'HIGHLIGHT_STRICT_BLOCK' => array(
   187 		1 => false,
   187         -1 => false,
   188 		2 => false,
   188         0 => false,
   189 		3 => false,
   189         1 => false,
   190 		),
   190         2 => true
   191 	'STYLES' => array(
   191         ),
   192 		'KEYWORDS' => array(
   192     'TAB_WIDTH' => 4,
   193 			1 => 'color: #b1b100;',
   193     'PARSER_CONTROL' => array(
   194 			2 => 'color: #000000; font-weight: bold;',
   194         'KEYWORDS' => array(
   195 			3 => 'color: #000066;'
   195             2 => array(
   196 			),
   196                 'DISALLOWED_BEFORE' => '(?<=&lt;|&lt;\/)',
   197 		'COMMENTS' => array(
   197                 'DISALLOWED_AFTER' => '(?=\s|\/|&gt;)',
   198 			'MULTI' => 'color: #808080; font-style: italic;'
   198             )
   199 			),
   199         )
   200 		'ESCAPE_CHAR' => array(
   200     )
   201 			0 => 'color: #000099; font-weight: bold;'
       
   202 			),
       
   203 		'BRACKETS' => array(
       
   204 			0 => 'color: #66cc66;'
       
   205 			),
       
   206 		'STRINGS' => array(
       
   207 			0 => 'color: #ff0000;'
       
   208 			),
       
   209 		'NUMBERS' => array(
       
   210 			0 => 'color: #cc66cc;'
       
   211 			),
       
   212 		'METHODS' => array(
       
   213 			),
       
   214 		'SYMBOLS' => array(
       
   215 			0 => 'color: #66cc66;'
       
   216 			),
       
   217 		'SCRIPT' => array(
       
   218 			0 => 'color: #00bbdd;',
       
   219 			1 => 'color: #ddbb00;',
       
   220 			2 => 'color: #009900;'
       
   221 			),
       
   222 		'REGEXPS' => array(
       
   223 			)
       
   224 		),
       
   225 	'URLS' => array(
       
   226 		1 => '',
       
   227 		2 => 'http://december.com/html/4/element/{FNAME}.html',
       
   228 		3 => ''
       
   229 		),
       
   230 	'OOLANG' => false,
       
   231 	'OBJECT_SPLITTERS' => array(
       
   232 		),
       
   233 	'REGEXPS' => array(
       
   234 		),
       
   235 	'STRICT_MODE_APPLIES' => GESHI_ALWAYS,
       
   236 	'SCRIPT_DELIMITERS' => array(
       
   237 		0 => array(
       
   238 			'<!DOCTYPE' => '>'
       
   239 			),
       
   240 		1 => array(
       
   241 			'&' => ';'
       
   242 			),
       
   243 		2 => array(
       
   244 			'<' => '>'
       
   245 			)
       
   246 	),
       
   247 	'HIGHLIGHT_STRICT_BLOCK' => array(
       
   248 		0 => false,
       
   249 		1 => false,
       
   250 		2 => true
       
   251         ),
       
   252     'TAB_WIDTH' => 4
       
   253 );
   201 );
   254 
   202 
   255 ?>
   203 ?>