[ Index ]
 

Code source de DokuWiki 2006-11-06

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/inc/geshi/ -> html4strict.php (source)

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


Généré le : Tue Apr 3 20:47:31 2007 par Balluche grâce à PHPXref 0.7