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.9.1 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 42$language_data = array ( 43 'LANG_NAME' => 'eMail (mbox)', 44 'COMMENT_SINGLE' => array(), 45 'COMMENT_MULTI' => array(), 46 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, 47 'QUOTEMARKS' => array('"'), 48 'ESCAPE_CHAR' => '', 49 'KEYWORDS' => array( 50 1 => array( 51 'HTTP', 'SMTP', 'ASMTP', 'ESMTP' 52 ), 53 2 => array( 54 'Original-Recipient','Accept-Language','Alternate-Recipient', 55 'Archived-At','Authentication-Results','Auto-Submitted', 56 'Autoforwarded','Autosubmitted','Base','Comments', 57 'Content-Alternative','Content-Base','Content-Description', 58 'Content-Disposition','Content-Duration','Content-features', 59 'Content-ID','Content-Identifier','Content-Language', 60 'Content-Location','Content-MD5','Content-Return', 61 'Content-Transfer-Encoding','Content-Type','Conversion', 62 'Conversion-With-Loss','Deferred-Delivery','Delivery-Date', 63 'Discarded-X400-IPMS-Extensions','Discarded-X400-MTS-Extensions', 64 'Disclose-Recipients','Disposition-Notification-Options', 65 'Disposition-Notification-To','DKIM-Signature', 66 'DL-Expansion-History','Downgraded-Bcc','Downgraded-Cc', 67 'Downgraded-Disposition-Notification-To', 68 'Downgraded-Final-Recipient','Downgraded-From', 69 'Downgraded-In-Reply-To','Downgraded-Mail-From', 70 'Downgraded-Message-Id','Downgraded-Original-Recipient', 71 'Downgraded-Rcpt-To','Downgraded-References', 72 'Downgraded-Reply-To','Downgraded-Resent-Bcc', 73 'Downgraded-Resent-Cc','Downgraded-Resent-From', 74 'Downgraded-Resent-Reply-To','Downgraded-Resent-Sender', 75 'Downgraded-Resent-To','Downgraded-Return-Path', 76 'Downgraded-Sender','Downgraded-To','Encoding','Encrypted','Expires', 77 'Expiry-Date','Generate-Delivery-Report','Importance','In-Reply-To', 78 'Incomplete-Copy','Keywords','Language','Latest-Delivery-Time', 79 'List-Archive','List-Help','List-ID','List-Owner','List-Post', 80 'List-Subscribe','List-Unsubscribe','List-Unsubscribe-Post', 81 'Message-Context','Message-ID','Message-Type','MIME-Version', 82 'MMHS-Acp127-Message-Identifier','MMHS-Codress-Message-Indicator', 83 'MMHS-Copy-Precedence','MMHS-Exempted-Address', 84 'MMHS-Extended-Authorisation-Info','MMHS-Handling-Instructions', 85 'MMHS-Message-Instructions','MMHS-Message-Type', 86 'MMHS-Originator-PLAD','MMHS-Originator-Reference', 87 'MMHS-Other-Recipients-Indicator-CC', 88 'MMHS-Other-Recipients-Indicator-To','MMHS-Primary-Precedence', 89 'MMHS-Subject-Indicator-Codes','MT-Priority','Obsoletes', 90 'Organization','Original-Encoded-Information-Types','Original-From', 91 'Original-Message-ID','Original-Subject','Originator-Return-Address', 92 'PICS-Label','Prevent-NonDelivery-Report','Priority','Received', 93 'Received-SPF','References','Reply-By','Reply-To', 94 'Require-Recipient-Valid-Since','Resent-Bcc','Resent-Cc', 95 'Resent-Date','Resent-From','Resent-Message-ID','Resent-Reply-To', 96 'Resent-Sender','Resent-To','Return-Path','Sensitivity', 97 'Solicitation','Supersedes','VBR-Info','X400-Content-Identifier', 98 'X400-Content-Return','X400-Content-Type','X400-MTS-Identifier', 99 'X400-Originator','X400-Received','X400-Recipients','X400-Trace' 100 ), 101 3 => array( 102 'Bcc','CC','Date','From','Sender','Subject','To' 103 ), 104 4 => array( 105 'by', 'for', 'from', 'id', 'with' 106 ) 107 ), 108 'SYMBOLS' => array( 109 ':', ';', '<', '>', '[', ']' 110 ), 111 'CASE_SENSITIVE' => array( 112 GESHI_COMMENTS => false, 113 1 => true, 114 2 => false, 115 3 => false, 116 4 => true 117 ), 118 'STYLES' => array( 119 'KEYWORDS' => array( 120 1 => 'color: #0000FF; font-weight: bold;', 121 2 => 'color: #000000; font-weight: bold;', 122 3 => 'color: #800000; font-weight: bold;', 123 4 => 'font-weight: bold;', 124 ), 125 'COMMENTS' => array( 126 ), 127 'ESCAPE_CHAR' => array( 128 0 => 'color: #000099; font-weight: bold;' 129 ), 130 'BRACKETS' => array( 131 0 => 'color: #66cc66;' 132 ), 133 'STRINGS' => array( 134 0 => 'color: #ff0000;' 135 ), 136 'NUMBERS' => array( 137 0 => 'color: #cc66cc;' 138 ), 139 'METHODS' => array( 140 ), 141 'SYMBOLS' => array( 142 0 => 'color: #66cc66;' 143 ), 144 'SCRIPT' => array( 145 0 => 'color: #000040;', 146 1 => 'color: #002040;', 147 ), 148 'REGEXPS' => array( 149 1 => 'color: #000000; font-weight: bold;', 150 2 => 'color: #0000FF;', 151 3 => 'color: #008000;', 152 4 => 'color: #0000FF; font-weight: bold;', 153 5 => 'font-weight: bold;', 154 6 => 'color: #400080;' 155 ) 156 ), 157 'URLS' => array( 158 1 => '', 159 2 => '', 160 3 => '', 161 4 => '' 162 ), 163 'OOLANG' => false, 164 'OBJECT_SPLITTERS' => array( 165 ), 166 'REGEXPS' => array( 167 // Non-Standard-Header 168 1 => array( 169 GESHI_SEARCH => "(?<=\A\x20|\n)x-[a-z0-9\-]*(?=\s*:|\s*<)", 170 GESHI_REPLACE => "\\0", 171 GESHI_MODIFIERS => "smi", 172 GESHI_BEFORE => "", 173 GESHI_AFTER => "" 174 ), 175 //Email-Adresses or Mail-IDs 176 2 => array( 177 GESHI_SEARCH => "\b(?<!\\/)(?P<q>\"?)[\w\.\-]+\k<q>@(?!-)[\w\-]+(?<!-)(?:(?:\.(?!-)[\w\-]+(?<!-))*)?", 178 GESHI_REPLACE => "\\0", 179 GESHI_MODIFIERS => "mi", 180 GESHI_BEFORE => "", 181 GESHI_AFTER => "" 182 ), 183 //Date values in RFC format 184 3 => array( 185 GESHI_SEARCH => "\b(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s+\d\d?\s+" . 186 "(?:Jan|Feb|Mar|apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s+" . 187 "\d{4}\s+\d\d?:\d\d:\d\d\s+[+\-]\d{4}(?:\s+\(\w+\))?", 188 GESHI_REPLACE => "\\0", 189 GESHI_MODIFIERS => "mi", 190 GESHI_BEFORE => "", 191 GESHI_AFTER => "" 192 ), 193 //IP addresses 194 4 => array( 195 GESHI_SEARCH => "(?<=\s)\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}(?=\s)|". 196 "(?<=\[)\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}(?=\])|". 197 "(?<==)\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}(?=<)|". 198 199 "(?<=\s)(?:[a-f\d]{1,4}\:)+(?:[a-f\d]{0,4})?(?:\:[a-f\d]{1,4})+(?=\s)|". 200 "(?<=\[)(?:[a-f\d]{1,4}\:)+(?:[a-f\d]{0,4})?(?:\:[a-f\d]{1,4})+(?=\])|". 201 "(?<==)(?:[a-f\d]{1,4}\:)+(?:[a-f\d]{0,4})?(?:\:[a-f\d]{1,4})+(?=<)|". 202 203 "(?<=\s)\:(?:\:[a-f\d]{1,4})+(?=\s)|". 204 "(?<=\[)\:(?:\:[a-f\d]{1,4})+(?=\])|". 205 "(?<==)\:(?:\:[a-f\d]{1,4})+(?=<)|". 206 207 "(?<=\s)(?:[a-f\d]{1,4}\:)+\:(?=\s)|". 208 "(?<=\[)(?:[a-f\d]{1,4}\:)+\:(?=\])|". 209 "(?<==)(?:[a-f\d]{1,4}\:)+\:(?=<)", 210 GESHI_REPLACE => "\\0", 211 GESHI_MODIFIERS => "i", 212 GESHI_BEFORE => "", 213 GESHI_AFTER => "" 214 ), 215 //Field-Assignments 216 5 => array( 217 GESHI_SEARCH => "(?<=\s)[A-Z0-9\-\.]+(?==(?:$|\s$|[^\s=]))", 218 GESHI_REPLACE => "\\0", 219 GESHI_MODIFIERS => "mi", 220 GESHI_BEFORE => "", 221 GESHI_AFTER => "" 222 ), 223 //MIME type 224 6 => array( 225 GESHI_SEARCH => "(?<=\s)(?:audio|application|image|multipart|text|". 226 "video|x-[a-z0-9\-]+)\/[a-z0-9][a-z0-9\-]*(?=\s|<|$)", 227 GESHI_REPLACE => "\\0", 228 GESHI_MODIFIERS => "m", 229 GESHI_BEFORE => "", 230 GESHI_AFTER => "" 231 ) 232 ), 233 'STRICT_MODE_APPLIES' => GESHI_ALWAYS, 234 'SCRIPT_DELIMITERS' => array( 235 0 => "/(?P<start>^)[A-Za-z][a-zA-Z0-9\-]*\s*:\s*(?:.|(?=\n\s)\n)*(?P<end>$)/m", 236 1 => "/(?P<start>^)--[a-zA-Z0-9_=\-]+[a-zA-Z0-9_](?:--)?(?P<end>$)/m" 237 ), 238 'HIGHLIGHT_STRICT_BLOCK' => array( 239 0 => true, 240 1 => false 241 ), 242 'TAB_WIDTH' => 4, 243 'PARSER_CONTROL' => array( 244 'KEYWORDS' => array( 245 2 => array( 246 'DISALLOWED_BEFORE' => '(?<=\A\x20|\n)', 247 'DISALLOWED_AFTER' => '(?=\s*:)', 248 ), 249 3 => array( 250 'DISALLOWED_BEFORE' => '(?<=\A\x20|\n)', 251 'DISALLOWED_AFTER' => '(?=\s*:)', 252 ), 253 4 => array( 254 'DISALLOWED_BEFORE' => '(?<=\s)', 255 'DISALLOWED_AFTER' => '(?=\s|\b)', 256 ) 257 ), 258 'ENABLE_FLAGS' => array( 259 'BRACKETS' => GESHI_NEVER, 260 'COMMENTS' => GESHI_NEVER, 261 'NUMBERS' => GESHI_NEVER 262 ) 263 ) 264); 265