KXStudio Website https://kx.studio/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

html4strict.php 6.7KB

11 years ago
11 years ago
11 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. <?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.11
  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. $language_data = array (
  52. 'LANG_NAME' => 'HTML',
  53. 'COMMENT_SINGLE' => array(),
  54. 'COMMENT_MULTI' => array(),
  55. 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
  56. 'QUOTEMARKS' => array("'", '"'),
  57. 'ESCAPE_CHAR' => '',
  58. 'KEYWORDS' => array(
  59. 2 => array(
  60. 'a', 'abbr', 'acronym', 'address', 'applet', 'area',
  61. 'base', 'basefont', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'b',
  62. 'caption', 'center', 'cite', 'code', 'colgroup', 'col',
  63. 'dd', 'del', 'dfn', 'dir', 'div', 'dl', 'dt',
  64. 'em',
  65. 'fieldset', 'font', 'form', 'frame', 'frameset',
  66. 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'hr', 'html',
  67. 'iframe', 'ilayer', 'img', 'input', 'ins', 'isindex', 'i',
  68. 'kbd',
  69. 'label', 'legend', 'link', 'li',
  70. 'map', 'meta',
  71. 'noframes', 'noscript',
  72. 'object', 'ol', 'optgroup', 'option',
  73. 'param', 'pre', 'p',
  74. 'q',
  75. 'samp', 'script', 'select', 'small', 'span', 'strike', 'strong', 'style', 'sub', 'sup', 's',
  76. 'table', 'tbody', 'td', 'textarea', 'text', 'tfoot', 'thead', 'th', 'title', 'tr', 'tt',
  77. 'ul', 'u',
  78. 'var',
  79. ),
  80. 3 => array(
  81. 'abbr', 'accept-charset', 'accept', 'accesskey', 'action', 'align', 'alink', 'alt', 'archive', 'axis',
  82. 'background', 'bgcolor', 'border',
  83. 'cellpadding', 'cellspacing', 'char', 'charoff', 'charset', 'checked', 'cite', 'class', 'classid', 'clear', 'code', 'codebase', 'codetype', 'color', 'cols', 'colspan', 'compact', 'content', 'coords',
  84. 'data', 'datetime', 'declare', 'defer', 'dir', 'disabled',
  85. 'enctype',
  86. 'face', 'for', 'frame', 'frameborder',
  87. 'headers', 'height', 'href', 'hreflang', 'hspace', 'http-equiv',
  88. 'id', 'ismap',
  89. 'label', 'lang', 'language', 'link', 'longdesc',
  90. 'marginheight', 'marginwidth', 'maxlength', 'media', 'method', 'multiple',
  91. 'name', 'nohref', 'noresize', 'noshade', 'nowrap',
  92. 'object', 'onblur', 'onchange', 'onclick', 'ondblclick', 'onfocus', 'onkeydown', 'onkeypress', 'onkeyup', 'onload', 'onmousedown', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'onreset', 'onselect', 'onsubmit', 'onunload',
  93. 'profile', 'prompt',
  94. 'readonly', 'rel', 'rev', 'rowspan', 'rows', 'rules',
  95. 'scheme', 'scope', 'scrolling', 'selected', 'shape', 'size', 'span', 'src', 'standby', 'start', 'style', 'summary',
  96. 'tabindex', 'target', 'text', 'title', 'type',
  97. 'usemap',
  98. 'valign', 'value', 'valuetype', 'version', 'vlink', 'vspace',
  99. 'width'
  100. )
  101. ),
  102. 'SYMBOLS' => array(
  103. '/', '='
  104. ),
  105. 'CASE_SENSITIVE' => array(
  106. GESHI_COMMENTS => false,
  107. 2 => false,
  108. 3 => false,
  109. ),
  110. 'STYLES' => array(
  111. 'KEYWORDS' => array(
  112. 2 => 'color: #000000; font-weight: bold;',
  113. 3 => 'color: #000066;'
  114. ),
  115. 'COMMENTS' => array(
  116. ),
  117. 'ESCAPE_CHAR' => array(
  118. 0 => 'color: #000099; font-weight: bold;'
  119. ),
  120. 'BRACKETS' => array(
  121. 0 => 'color: #66cc66;'
  122. ),
  123. 'STRINGS' => array(
  124. 0 => 'color: #ff0000;'
  125. ),
  126. 'NUMBERS' => array(
  127. 0 => 'color: #cc66cc;'
  128. ),
  129. 'METHODS' => array(
  130. ),
  131. 'SYMBOLS' => array(
  132. 0 => 'color: #66cc66;'
  133. ),
  134. 'SCRIPT' => array(
  135. -2 => 'color: #404040;', // CDATA
  136. -1 => 'color: #808080; font-style: italic;', // comments
  137. 0 => 'color: #00bbdd;',
  138. 1 => 'color: #ddbb00;',
  139. 2 => 'color: #009900;'
  140. ),
  141. 'REGEXPS' => array(
  142. )
  143. ),
  144. 'URLS' => array(
  145. 2 => 'http://december.com/html/4/element/{FNAMEL}.html',
  146. 3 => ''
  147. ),
  148. 'OOLANG' => false,
  149. 'OBJECT_SPLITTERS' => array(
  150. ),
  151. 'REGEXPS' => array(
  152. ),
  153. 'STRICT_MODE_APPLIES' => GESHI_ALWAYS,
  154. 'SCRIPT_DELIMITERS' => array(
  155. -2 => array(
  156. '<![CDATA[' => ']]>'
  157. ),
  158. -1 => array(
  159. '<!--' => '-->'
  160. ),
  161. 0 => array(
  162. '<!DOCTYPE' => '>'
  163. ),
  164. 1 => array(
  165. '&' => ';'
  166. ),
  167. 2 => array(
  168. '<' => '>'
  169. )
  170. ),
  171. 'HIGHLIGHT_STRICT_BLOCK' => array(
  172. -2 => false,
  173. -1 => false,
  174. 0 => false,
  175. 1 => false,
  176. 2 => true
  177. ),
  178. 'TAB_WIDTH' => 4,
  179. 'PARSER_CONTROL' => array(
  180. 'KEYWORDS' => array(
  181. 2 => array(
  182. 'DISALLOWED_BEFORE' => '(?<=&lt;|&lt;\/)',
  183. 'DISALLOWED_AFTER' => '(?=\s|\/|&gt;)',
  184. )
  185. )
  186. )
  187. );
  188. ?>