1 | 1 | simandl | <?php |
2 | | | /************************************************************************************* |
3 | | | * email.php |
4 | | | * --------------- |
5 | | | * Author: Benny Baumann (BenBE@geshi.org) |
6 | | | * Copyright: (c) 2008 Benny Baumann (http://qbnz.com/highlighter/) |
7 | 3 | simandl | * Release Version: 1.0.8.3 |
8 | 1 | simandl | * 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 | 3 | simandl | 1 => array( |
51 | | | 'HTTP', 'SMTP', 'ASMTP', 'ESMTP' |
52 | | | ), |
53 | 1 | simandl | 2 => array( |
54 | 3 | simandl | 'Content-Type','Content-Transfer-Encoding','Content-Disposition', |
55 | | | 'Delivered-To','Dkim-Signature','Domainkey-Signature','In-Reply-To', |
56 | | | 'Message-Id','MIME-Version','Received','Received-SPF','References', |
57 | | | 'Resend-From','Resend-To','Return-Path' |
58 | 1 | simandl | ), |
59 | | | 3 => array( |
60 | 3 | simandl | 'Date','From','Subject','To', |
61 | 1 | simandl | ), |
62 | | | 4 => array( |
63 | 3 | simandl | 'by', 'for', 'from', 'id', 'with' |
64 | 1 | simandl | ) |
65 | | | ), |
66 | | | 'SYMBOLS' => array( |
67 | | | ':', ';', '<', '>', '[', ']' |
68 | | | ), |
69 | | | 'CASE_SENSITIVE' => array( |
70 | | | GESHI_COMMENTS => false, |
71 | 3 | simandl | 1 => true, |
72 | 1 | simandl | 2 => false, |
73 | | | 3 => false, |
74 | | | 4 => true |
75 | | | ), |
76 | | | 'STYLES' => array( |
77 | | | 'KEYWORDS' => array( |
78 | 3 | simandl | 1 => 'color: #0000FF; font-weight: bold;', |
79 | 1 | simandl | 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 | | | |
87 | | | ), |
88 | | | 'BRACKETS' => array( |
89 | | | |
90 | | | ), |
91 | | | 'STRINGS' => array( |
92 | | | |
93 | | | ), |
94 | | | 'NUMBERS' => array( |
95 | | | |
96 | | | ), |
97 | | | 'METHODS' => array( |
98 | | | ), |
99 | | | 'SYMBOLS' => array( |
100 | | | |
101 | | | ), |
102 | | | 'SCRIPT' => array( |
103 | | | |
104 | | | ), |
105 | | | 'REGEXPS' => array( |
106 | | | 1 => 'color: #000000; font-weight: bold;', |
107 | | | 2 => 'color: #0000FF;', |
108 | 3 | simandl | 3 => 'color: #008000;', |
109 | | | 4 => 'color: #0000FF; font-weight: bold;', |
110 | | | 5 => 'font-weight: bold;', |
111 | | | 6 => 'color: #400080;' |
112 | 1 | simandl | ) |
113 | | | ), |
114 | | | 'URLS' => array( |
115 | 3 | simandl | 1 => '', |
116 | 1 | simandl | 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 | 3 | simandl | GESHI_SEARCH => "(?<=\A\x20|\n)x-[a-z0-9\-]*(?=\s*:|\s*<)", |
127 | 1 | simandl | 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[\w\.]+@\w+(?:(?:\.\w+)*\.\w{2,4})?", |
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 | 3 | simandl | ), |
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 | | | GESHI_REPLACE => "\\0", |
156 | | | GESHI_MODIFIERS => "i", |
157 | | | GESHI_BEFORE => "", |
158 | | | GESHI_AFTER => "" |
159 | | | ), |
160 | | | //Field-Assignments |
161 | | | 5 => array( |
162 | | | GESHI_SEARCH => "(?<=\s)[A-Z0-9\-]+(?==(?!\s|$))", |
163 | | | GESHI_REPLACE => "\\0", |
164 | | | GESHI_MODIFIERS => "mi", |
165 | | | GESHI_BEFORE => "", |
166 | | | GESHI_AFTER => "" |
167 | | | ), |
168 | | | //MIME type |
169 | | | 6 => array( |
170 | | | GESHI_SEARCH => "(?<=\s)(?:audio|application|image|multipart|text|". |
171 | | | "video|x-[a-z0-9\-]+)\/[a-z0-9][a-z0-9\-]*(?=\s|<|$)", |
172 | | | GESHI_REPLACE => "\\0", |
173 | | | GESHI_MODIFIERS => "m", |
174 | | | GESHI_BEFORE => "", |
175 | | | GESHI_AFTER => "" |
176 | 1 | simandl | ) |
177 | | | ), |
178 | | | 'STRICT_MODE_APPLIES' => GESHI_ALWAYS, |
179 | | | 'SCRIPT_DELIMITERS' => array( |
180 | | | |
181 | | | ), |
182 | | | 'HIGHLIGHT_STRICT_BLOCK' => array( |
183 | | | |
184 | | | ), |
185 | | | 'TAB_WIDTH' => 4, |
186 | | | 'PARSER_CONTROL' => array( |
187 | | | 'KEYWORDS' => array( |
188 | | | 2 => array( |
189 | 3 | simandl | 'DISALLOWED_BEFORE' => '(?<=\A\x20|\n)', |
190 | 1 | simandl | 'DISALLOWED_AFTER' => '(?=\s*:)', |
191 | | | ), |
192 | | | 3 => array( |
193 | 3 | simandl | 'DISALLOWED_BEFORE' => '(?<=\A\x20|\n)', |
194 | 1 | simandl | 'DISALLOWED_AFTER' => '(?=\s*:)', |
195 | | | ), |
196 | | | 4 => array( |
197 | | | 'DISALLOWED_BEFORE' => '(?<=\s)', |
198 | | | 'DISALLOWED_AFTER' => '(?=\s|\b)', |
199 | | | ) |
200 | | | ), |
201 | | | 'ENABLE_FLAGS' => array( |
202 | | | 'BRACKETS' => GESHI_NEVER, |
203 | | | 'COMMENTS' => GESHI_NEVER, |
204 | | | 'NUMBERS' => GESHI_NEVER |
205 | | | ) |
206 | | | ) |
207 | | | ); |
208 | | | |
209 | | | ?> |