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.

212 lines
7.8KB

  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.8.11
  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. $language_data = array (
  52. 'LANG_NAME' => 'HTML5',
  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', 'address', 'article', 'area', 'aside', 'audio',
  61. 'base', 'bdo', 'blockquote', 'body', 'br', 'button', 'b',
  62. 'caption', 'cite', 'code', 'colgroup', 'col', 'canvas', 'command', 'datalist', 'details',
  63. 'dd', 'del', 'dfn', 'div', 'dl', 'dt',
  64. 'em', 'embed',
  65. 'fieldset', 'form', 'figcaption', 'figure', 'footer',
  66. 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'hr', 'html', 'header', 'hgroup',
  67. 'iframe', 'ilayer', 'img', 'input', 'ins', 'isindex', 'i',
  68. 'kbd', 'keygen',
  69. 'label', 'legend', 'link', 'li',
  70. 'map', 'meta', 'mark', 'meter',
  71. 'noscript', 'nav',
  72. 'object', 'ol', 'optgroup', 'option', 'output',
  73. 'param', 'pre', 'p', 'progress',
  74. 'q',
  75. 'rp', 'rt', 'ruby',
  76. 'samp', 'script', 'select', 'small', 'span', 'strong', 'style', 'sub', 'sup', 's', 'section', 'source', 'summary',
  77. 'table', 'tbody', 'td', 'textarea', 'text', 'tfoot', 'thead', 'th', 'title', 'tr', 'time',
  78. 'ul',
  79. 'var', 'video',
  80. 'wbr',
  81. ),
  82. 3 => array(
  83. 'abbr', 'accept-charset', 'accept', 'accesskey', 'action', 'align', 'alink', 'alt', 'archive', 'axis', 'autocomplete', 'autofocus',
  84. 'background', 'bgcolor', 'border',
  85. 'cellpadding', 'cellspacing', 'char', 'charoff', 'charset', 'checked', 'cite', 'class', 'classid', 'clear', 'code', 'codebase', 'codetype', 'color', 'cols', 'colspan', 'compact', 'content', 'coords', 'contenteditable', 'contextmenu',
  86. 'data', 'datetime', 'declare', 'defer', 'dir', 'disabled', 'draggable', 'dropzone',
  87. 'enctype',
  88. 'face', 'for', 'frame', 'frameborder', 'form', 'formaction', 'formenctype', 'formmethod', 'formnovalidate', 'formtarget',
  89. 'headers', 'height', 'href', 'hreflang', 'hspace', 'http-equiv', 'hidden',
  90. 'id', 'ismap',
  91. 'label', 'lang', 'language', 'link', 'longdesc',
  92. 'marginheight', 'marginwidth', 'maxlength', 'media', 'method', 'multiple', 'min', 'max',
  93. 'name', 'nohref', 'noresize', 'noshade', 'nowrap', 'novalidate',
  94. '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',
  95. 'profile', 'prompt', 'pattern', 'placeholder',
  96. 'readonly', 'rel', 'rev', 'rowspan', 'rows', 'rules', 'required',
  97. 'scheme', 'scope', 'scrolling', 'selected', 'shape', 'size', 'span', 'src', 'standby', 'start', 'style', 'summary', 'spellcheck', 'step',
  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. ?>