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.

222 lines
7.5KB

  1. <?php
  2. /*************************************************************************************
  3. * email.php
  4. * ---------------
  5. * Author: Benny Baumann (BenBE@geshi.org)
  6. * Copyright: (c) 2008 Benny Baumann (http://qbnz.com/highlighter/)
  7. * Release Version: 1.0.8.11
  8. * Date Started: 2008/10/19
  9. *
  10. * Email (mbox \ eml \ RFC format) language file for GeSHi.
  11. *
  12. * CHANGES
  13. * -------
  14. * 2008/10/19 (1.0.8.1)
  15. * - First Release
  16. *
  17. * TODO (updated 2008/10/19)
  18. * -------------------------
  19. * * Better checks when a header field should be expected
  20. * * Fix the bound checks for kw groups 2 and 3, as well as rx group 1
  21. *
  22. *************************************************************************************
  23. *
  24. * This file is part of GeSHi.
  25. *
  26. * GeSHi is free software; you can redistribute it and/or modify
  27. * it under the terms of the GNU General Public License as published by
  28. * the Free Software Foundation; either version 2 of the License, or
  29. * (at your option) any later version.
  30. *
  31. * GeSHi is distributed in the hope that it will be useful,
  32. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  33. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  34. * GNU General Public License for more details.
  35. *
  36. * You should have received a copy of the GNU General Public License
  37. * along with GeSHi; if not, write to the Free Software
  38. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  39. *
  40. ************************************************************************************/
  41. $language_data = array (
  42. 'LANG_NAME' => 'eMail (mbox)',
  43. 'COMMENT_SINGLE' => array(),
  44. 'COMMENT_MULTI' => array(),
  45. 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
  46. 'QUOTEMARKS' => array('"'),
  47. 'ESCAPE_CHAR' => '',
  48. 'KEYWORDS' => array(
  49. 1 => array(
  50. 'HTTP', 'SMTP', 'ASMTP', 'ESMTP'
  51. ),
  52. 2 => array(
  53. 'Authentication-Results','Comment','Content-Description','Content-Type',
  54. 'Content-Disposition','Content-Transfer-Encoding','Delivered-To',
  55. 'Dkim-Signature','Domainkey-Signature','In-Reply-To','Message-Id',
  56. 'MIME-Version','OpenPGP','Received','Received-SPF','References',
  57. 'Reply-To', 'Resend-From','Resend-To','Return-Path','User-Agent'
  58. ),
  59. 3 => array(
  60. 'Date','From','Sender','Subject','To','CC'
  61. ),
  62. 4 => array(
  63. 'by', 'for', 'from', 'id', 'with'
  64. )
  65. ),
  66. 'SYMBOLS' => array(
  67. ':', ';', '<', '>', '[', ']'
  68. ),
  69. 'CASE_SENSITIVE' => array(
  70. GESHI_COMMENTS => false,
  71. 1 => true,
  72. 2 => false,
  73. 3 => false,
  74. 4 => true
  75. ),
  76. 'STYLES' => array(
  77. 'KEYWORDS' => array(
  78. 1 => 'color: #0000FF; font-weight: bold;',
  79. 2 => 'color: #000000; font-weight: bold;',
  80. 3 => 'color: #800000; font-weight: bold;',
  81. 4 => 'font-weight: bold;',
  82. ),
  83. 'COMMENTS' => array(
  84. ),
  85. 'ESCAPE_CHAR' => array(
  86. 0 => 'color: #000099; font-weight: bold;'
  87. ),
  88. 'BRACKETS' => array(
  89. 0 => 'color: #66cc66;'
  90. ),
  91. 'STRINGS' => array(
  92. 0 => 'color: #ff0000;'
  93. ),
  94. 'NUMBERS' => array(
  95. 0 => 'color: #cc66cc;'
  96. ),
  97. 'METHODS' => array(
  98. ),
  99. 'SYMBOLS' => array(
  100. 0 => 'color: #66cc66;'
  101. ),
  102. 'SCRIPT' => array(
  103. 0 => 'color: #000040;',
  104. ),
  105. 'REGEXPS' => array(
  106. 1 => 'color: #000000; font-weight: bold;',
  107. 2 => 'color: #0000FF;',
  108. 3 => 'color: #008000;',
  109. 4 => 'color: #0000FF; font-weight: bold;',
  110. 5 => 'font-weight: bold;',
  111. 6 => 'color: #400080;'
  112. )
  113. ),
  114. 'URLS' => array(
  115. 1 => '',
  116. 2 => '',
  117. 3 => '',
  118. 4 => ''
  119. ),
  120. 'OOLANG' => false,
  121. 'OBJECT_SPLITTERS' => array(
  122. ),
  123. 'REGEXPS' => array(
  124. // Non-Standard-Header
  125. 1 => array(
  126. GESHI_SEARCH => "(?<=\A\x20|\n)x-[a-z0-9\-]*(?=\s*:|\s*<)",
  127. GESHI_REPLACE => "\\0",
  128. GESHI_MODIFIERS => "smi",
  129. GESHI_BEFORE => "",
  130. GESHI_AFTER => ""
  131. ),
  132. //Email-Adresses or Mail-IDs
  133. 2 => array(
  134. GESHI_SEARCH => "\b(?<!\\/)(?P<q>\"?)[\w\.\-]+\k<q>@(?!-)[\w\-]+(?<!-)(?:(?:\.(?!-)[\w\-]+(?<!-))*)?",
  135. GESHI_REPLACE => "\\0",
  136. GESHI_MODIFIERS => "mi",
  137. GESHI_BEFORE => "",
  138. GESHI_AFTER => ""
  139. ),
  140. //Date values in RFC format
  141. 3 => array(
  142. GESHI_SEARCH => "\b(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s+\d\d?\s+" .
  143. "(?:Jan|Feb|Mar|apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s+" .
  144. "\d{4}\s+\d\d?:\d\d:\d\d\s+[+\-]\d{4}(?:\s+\(\w+\))?",
  145. GESHI_REPLACE => "\\0",
  146. GESHI_MODIFIERS => "mi",
  147. GESHI_BEFORE => "",
  148. GESHI_AFTER => ""
  149. ),
  150. //IP addresses
  151. 4 => array(
  152. GESHI_SEARCH => "(?<=\s)\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}(?=\s)|".
  153. "(?<=\[)\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}(?=\])|".
  154. "(?<==)\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}(?=<)|".
  155. "(?<=\s)(?:[a-f\d]{1,4}\:)+(?:[a-f\d]{0,4})?(?:\:[a-f\d]{1,4})+(?=\s)|".
  156. "(?<=\[)(?:[a-f\d]{1,4}\:)+(?:[a-f\d]{0,4})?(?:\:[a-f\d]{1,4})+(?=\])|".
  157. "(?<==)(?:[a-f\d]{1,4}\:)+(?:[a-f\d]{0,4})?(?:\:[a-f\d]{1,4})+(?=<)|".
  158. "(?<=\s)\:(?:\:[a-f\d]{1,4})+(?=\s)|".
  159. "(?<=\[)\:(?:\:[a-f\d]{1,4})+(?=\])|".
  160. "(?<==)\:(?:\:[a-f\d]{1,4})+(?=<)|".
  161. "(?<=\s)(?:[a-f\d]{1,4}\:)+\:(?=\s)|".
  162. "(?<=\[)(?:[a-f\d]{1,4}\:)+\:(?=\])|".
  163. "(?<==)(?:[a-f\d]{1,4}\:)+\:(?=<)",
  164. GESHI_REPLACE => "\\0",
  165. GESHI_MODIFIERS => "i",
  166. GESHI_BEFORE => "",
  167. GESHI_AFTER => ""
  168. ),
  169. //Field-Assignments
  170. 5 => array(
  171. GESHI_SEARCH => "(?<=\s)[A-Z0-9\-\.]+(?==(?:$|\s$|[^\s=]))",
  172. GESHI_REPLACE => "\\0",
  173. GESHI_MODIFIERS => "mi",
  174. GESHI_BEFORE => "",
  175. GESHI_AFTER => ""
  176. ),
  177. //MIME type
  178. 6 => array(
  179. GESHI_SEARCH => "(?<=\s)(?:audio|application|image|multipart|text|".
  180. "video|x-[a-z0-9\-]+)\/[a-z0-9][a-z0-9\-]*(?=\s|<|$)",
  181. GESHI_REPLACE => "\\0",
  182. GESHI_MODIFIERS => "m",
  183. GESHI_BEFORE => "",
  184. GESHI_AFTER => ""
  185. )
  186. ),
  187. 'STRICT_MODE_APPLIES' => GESHI_ALWAYS,
  188. 'SCRIPT_DELIMITERS' => array(
  189. 0 => "/(?P<start>^)[A-Za-z][a-zA-Z0-9\-]*\s*:\s*(?:.|(?=\n\s)\n)*(?P<end>$)/m"
  190. ),
  191. 'HIGHLIGHT_STRICT_BLOCK' => array(
  192. 0 => true,
  193. ),
  194. 'TAB_WIDTH' => 4,
  195. 'PARSER_CONTROL' => array(
  196. 'KEYWORDS' => array(
  197. 2 => array(
  198. 'DISALLOWED_BEFORE' => '(?<=\A\x20|\n)',
  199. 'DISALLOWED_AFTER' => '(?=\s*:)',
  200. ),
  201. 3 => array(
  202. 'DISALLOWED_BEFORE' => '(?<=\A\x20|\n)',
  203. 'DISALLOWED_AFTER' => '(?=\s*:)',
  204. ),
  205. 4 => array(
  206. 'DISALLOWED_BEFORE' => '(?<=\s)',
  207. 'DISALLOWED_AFTER' => '(?=\s|\b)',
  208. )
  209. ),
  210. 'ENABLE_FLAGS' => array(
  211. 'BRACKETS' => GESHI_NEVER,
  212. 'COMMENTS' => GESHI_NEVER,
  213. 'NUMBERS' => GESHI_NEVER
  214. )
  215. )
  216. );
  217. ?>