PageRenderTime 44ms CodeModel.GetById 15ms RepoModel.GetById 0ms app.codeStats 0ms

/plugins/content/geshi/geshi/geshi/html4strict.php

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