PageRenderTime 32ms CodeModel.GetById 13ms app.highlight 15ms RepoModel.GetById 2ms app.codeStats 0ms

/samples/scalate-presentation/src/highlight/languages/apache.js

http://github.com/scalate/scalate
JavaScript | 442 lines | 432 code | 1 blank | 9 comment | 0 complexity | df841226883b50d303d00adc3bf8ad1d MD5 | raw file
  1/*
  2Language: Apache
  3Author: Ruslan Keba <rukeba@gmail.com>
  4Website: http://rukeba.com/
  5Description: language definition for Apache configuration files (httpd.conf & .htaccess)
  6Version 1.1
  7Date: 2008-12-27
  8*/
  9
 10hljs.LANGUAGES.apache =
 11{
 12  case_insensitive: true,
 13  defaultMode: {
 14    lexems: [hljs.IDENT_RE],
 15    contains: ['comment', 'sqbracket', 'cbracket', 'number', 'tag', 'string'],
 16    keywords: {
 17      'keyword': {
 18        'acceptfilter': 1,
 19        'acceptmutex': 1,
 20        'acceptpathinfo': 1,
 21        'accessfilename': 1,
 22        'action': 1,
 23        'addalt': 1,
 24        'addaltbyencoding': 1,
 25        'addaltbytype': 1,
 26        'addcharset': 1,
 27        'adddefaultcharset': 1,
 28        'adddescription': 1,
 29        'addencoding': 1,
 30        'addhandler': 1,
 31        'addicon': 1,
 32        'addiconbyencoding': 1,
 33        'addiconbytype': 1,
 34        'addinputfilter': 1,
 35        'addlanguage': 1,
 36        'addmoduleinfo': 1,
 37        'addoutputfilter': 1,
 38        'addoutputfilterbytype': 1,
 39        'addtype': 1,
 40        'alias': 1,
 41        'aliasmatch': 1,
 42        'allow': 1,
 43        'allowconnect': 1,
 44        'allowencodedslashes': 1,
 45        'allowoverride': 1,
 46        'anonymous': 1,
 47        'anonymous_logemail': 1,
 48        'anonymous_mustgiveemail': 1,
 49        'anonymous_nouserid': 1,
 50        'anonymous_verifyemail': 1,
 51        'authbasicauthoritative': 1,
 52        'authbasicprovider': 1,
 53        'authdbduserpwquery': 1,
 54        'authdbduserrealmquery': 1,
 55        'authdbmgroupfile': 1,
 56        'authdbmtype': 1,
 57        'authdbmuserfile': 1,
 58        'authdefaultauthoritative': 1,
 59        'authdigestalgorithm': 1,
 60        'authdigestdomain': 1,
 61        'authdigestnccheck': 1,
 62        'authdigestnonceformat': 1,
 63        'authdigestnoncelifetime': 1,
 64        'authdigestprovider': 1,
 65        'authdigestqop': 1,
 66        'authdigestshmemsize': 1,
 67        'authgroupfile': 1,
 68        'authldapbinddn': 1,
 69        'authldapbindpassword': 1,
 70        'authldapcharsetconfig': 1,
 71        'authldapcomparednonserver': 1,
 72        'authldapdereferencealiases': 1,
 73        'authldapgroupattribute': 1,
 74        'authldapgroupattributeisdn': 1,
 75        'authldapremoteuserattribute': 1,
 76        'authldapremoteuserisdn': 1,
 77        'authldapurl': 1,
 78        'authname': 1,
 79        'authnprovideralias': 1,
 80        'authtype': 1,
 81        'authuserfile': 1,
 82        'authzdbmauthoritative': 1,
 83        'authzdbmtype': 1,
 84        'authzdefaultauthoritative': 1,
 85        'authzgroupfileauthoritative': 1,
 86        'authzldapauthoritative': 1,
 87        'authzownerauthoritative': 1,
 88        'authzuserauthoritative': 1,
 89        'balancermember': 1,
 90        'browsermatch': 1,
 91        'browsermatchnocase': 1,
 92        'bufferedlogs': 1,
 93        'cachedefaultexpire': 1,
 94        'cachedirlength': 1,
 95        'cachedirlevels': 1,
 96        'cachedisable': 1,
 97        'cacheenable': 1,
 98        'cachefile': 1,
 99        'cacheignorecachecontrol': 1,
100        'cacheignoreheaders': 1,
101        'cacheignorenolastmod': 1,
102        'cacheignorequerystring': 1,
103        'cachelastmodifiedfactor': 1,
104        'cachemaxexpire': 1,
105        'cachemaxfilesize': 1,
106        'cacheminfilesize': 1,
107        'cachenegotiateddocs': 1,
108        'cacheroot': 1,
109        'cachestorenostore': 1,
110        'cachestoreprivate': 1,
111        'cgimapextension': 1,
112        'charsetdefault': 1,
113        'charsetoptions': 1,
114        'charsetsourceenc': 1,
115        'checkcaseonly': 1,
116        'checkspelling': 1,
117        'chrootdir': 1,
118        'contentdigest': 1,
119        'cookiedomain': 1,
120        'cookieexpires': 1,
121        'cookielog': 1,
122        'cookiename': 1,
123        'cookiestyle': 1,
124        'cookietracking': 1,
125        'coredumpdirectory': 1,
126        'customlog': 1,
127        'dav': 1,
128        'davdepthinfinity': 1,
129        'davgenericlockdb': 1,
130        'davlockdb': 1,
131        'davmintimeout': 1,
132        'dbdexptime': 1,
133        'dbdkeep': 1,
134        'dbdmax': 1,
135        'dbdmin': 1,
136        'dbdparams': 1,
137        'dbdpersist': 1,
138        'dbdpreparesql': 1,
139        'dbdriver': 1,
140        'defaulticon': 1,
141        'defaultlanguage': 1,
142        'defaulttype': 1,
143        'deflatebuffersize': 1,
144        'deflatecompressionlevel': 1,
145        'deflatefilternote': 1,
146        'deflatememlevel': 1,
147        'deflatewindowsize': 1,
148        'deny': 1,
149        'directoryindex': 1,
150        'directorymatch': 1,
151        'directoryslash': 1,
152        'documentroot': 1,
153        'dumpioinput': 1,
154        'dumpiologlevel': 1,
155        'dumpiooutput': 1,
156        'enableexceptionhook': 1,
157        'enablemmap': 1,
158        'enablesendfile': 1,
159        'errordocument': 1,
160        'errorlog': 1,
161        'example': 1,
162        'expiresactive': 1,
163        'expiresbytype': 1,
164        'expiresdefault': 1,
165        'extendedstatus': 1,
166        'extfilterdefine': 1,
167        'extfilteroptions': 1,
168        'fileetag': 1,
169        'filterchain': 1,
170        'filterdeclare': 1,
171        'filterprotocol': 1,
172        'filterprovider': 1,
173        'filtertrace': 1,
174        'forcelanguagepriority': 1,
175        'forcetype': 1,
176        'forensiclog': 1,
177        'gracefulshutdowntimeout': 1,
178        'group': 1,
179        'header': 1,
180        'headername': 1,
181        'hostnamelookups': 1,
182        'identitycheck': 1,
183        'identitychecktimeout': 1,
184        'imapbase': 1,
185        'imapdefault': 1,
186        'imapmenu': 1,
187        'include': 1,
188        'indexheadinsert': 1,
189        'indexignore': 1,
190        'indexoptions': 1,
191        'indexorderdefault': 1,
192        'indexstylesheet': 1,
193        'isapiappendlogtoerrors': 1,
194        'isapiappendlogtoquery': 1,
195        'isapicachefile': 1,
196        'isapifakeasync': 1,
197        'isapilognotsupported': 1,
198        'isapireadaheadbuffer': 1,
199        'keepalive': 1,
200        'keepalivetimeout': 1,
201        'languagepriority': 1,
202        'ldapcacheentries': 1,
203        'ldapcachettl': 1,
204        'ldapconnectiontimeout': 1,
205        'ldapopcacheentries': 1,
206        'ldapopcachettl': 1,
207        'ldapsharedcachefile': 1,
208        'ldapsharedcachesize': 1,
209        'ldaptrustedclientcert': 1,
210        'ldaptrustedglobalcert': 1,
211        'ldaptrustedmode': 1,
212        'ldapverifyservercert': 1,
213        'limitinternalrecursion': 1,
214        'limitrequestbody': 1,
215        'limitrequestfields': 1,
216        'limitrequestfieldsize': 1,
217        'limitrequestline': 1,
218        'limitxmlrequestbody': 1,
219        'listen': 1,
220        'listenbacklog': 1,
221        'loadfile': 1,
222        'loadmodule': 1,
223        'lockfile': 1,
224        'logformat': 1,
225        'loglevel': 1,
226        'maxclients': 1,
227        'maxkeepaliverequests': 1,
228        'maxmemfree': 1,
229        'maxrequestsperchild': 1,
230        'maxrequestsperthread': 1,
231        'maxspareservers': 1,
232        'maxsparethreads': 1,
233        'maxthreads': 1,
234        'mcachemaxobjectcount': 1,
235        'mcachemaxobjectsize': 1,
236        'mcachemaxstreamingbuffer': 1,
237        'mcacheminobjectsize': 1,
238        'mcacheremovalalgorithm': 1,
239        'mcachesize': 1,
240        'metadir': 1,
241        'metafiles': 1,
242        'metasuffix': 1,
243        'mimemagicfile': 1,
244        'minspareservers': 1,
245        'minsparethreads': 1,
246        'mmapfile': 1,
247        'mod_gzip_on': 1,
248        'mod_gzip_add_header_count': 1,
249        'mod_gzip_keep_workfiles': 1,
250        'mod_gzip_dechunk': 1,
251        'mod_gzip_min_http': 1,
252        'mod_gzip_minimum_file_size': 1,
253        'mod_gzip_maximum_file_size': 1,
254        'mod_gzip_maximum_inmem_size': 1,
255        'mod_gzip_temp_dir': 1,
256        'mod_gzip_item_include': 1,
257        'mod_gzip_item_exclude': 1,
258        'mod_gzip_command_version': 1,
259        'mod_gzip_can_negotiate': 1,
260        'mod_gzip_handle_methods': 1,
261        'mod_gzip_static_suffix': 1,
262        'mod_gzip_send_vary': 1,
263        'mod_gzip_update_static': 1,
264        'modmimeusepathinfo': 1,
265        'multiviewsmatch': 1,
266        'namevirtualhost': 1,
267        'noproxy': 1,
268        'nwssltrustedcerts': 1,
269        'nwsslupgradeable': 1,
270        'options': 1,
271        'order': 1,
272        'passenv': 1,
273        'pidfile': 1,
274        'protocolecho': 1,
275        'proxybadheader': 1,
276        'proxyblock': 1,
277        'proxydomain': 1,
278        'proxyerroroverride': 1,
279        'proxyftpdircharset': 1,
280        'proxyiobuffersize': 1,
281        'proxymaxforwards': 1,
282        'proxypass': 1,
283        'proxypassinterpolateenv': 1,
284        'proxypassmatch': 1,
285        'proxypassreverse': 1,
286        'proxypassreversecookiedomain': 1,
287        'proxypassreversecookiepath': 1,
288        'proxypreservehost': 1,
289        'proxyreceivebuffersize': 1,
290        'proxyremote': 1,
291        'proxyremotematch': 1,
292        'proxyrequests': 1,
293        'proxyset': 1,
294        'proxystatus': 1,
295        'proxytimeout': 1,
296        'proxyvia': 1,
297        'readmename': 1,
298        'receivebuffersize': 1,
299        'redirect': 1,
300        'redirectmatch': 1,
301        'redirectpermanent': 1,
302        'redirecttemp': 1,
303        'removecharset': 1,
304        'removeencoding': 1,
305        'removehandler': 1,
306        'removeinputfilter': 1,
307        'removelanguage': 1,
308        'removeoutputfilter': 1,
309        'removetype': 1,
310        'requestheader': 1,
311        'require': 2,
312        'rewritebase': 1,
313        'rewritecond': 10,
314        'rewriteengine': 1,
315        'rewritelock': 1,
316        'rewritelog': 1,
317        'rewriteloglevel': 1,
318        'rewritemap': 1,
319        'rewriteoptions': 1,
320        'rewriterule': 10,
321        'rlimitcpu': 1,
322        'rlimitmem': 1,
323        'rlimitnproc': 1,
324        'satisfy': 1,
325        'scoreboardfile': 1,
326        'script': 1,
327        'scriptalias': 1,
328        'scriptaliasmatch': 1,
329        'scriptinterpretersource': 1,
330        'scriptlog': 1,
331        'scriptlogbuffer': 1,
332        'scriptloglength': 1,
333        'scriptsock': 1,
334        'securelisten': 1,
335        'seerequesttail': 1,
336        'sendbuffersize': 1,
337        'serveradmin': 1,
338        'serveralias': 1,
339        'serverlimit': 1,
340        'servername': 1,
341        'serverpath': 1,
342        'serverroot': 1,
343        'serversignature': 1,
344        'servertokens': 1,
345        'setenv': 1,
346        'setenvif': 1,
347        'setenvifnocase': 1,
348        'sethandler': 1,
349        'setinputfilter': 1,
350        'setoutputfilter': 1,
351        'ssienableaccess': 1,
352        'ssiendtag': 1,
353        'ssierrormsg': 1,
354        'ssistarttag': 1,
355        'ssitimeformat': 1,
356        'ssiundefinedecho': 1,
357        'sslcacertificatefile': 1,
358        'sslcacertificatepath': 1,
359        'sslcadnrequestfile': 1,
360        'sslcadnrequestpath': 1,
361        'sslcarevocationfile': 1,
362        'sslcarevocationpath': 1,
363        'sslcertificatechainfile': 1,
364        'sslcertificatefile': 1,
365        'sslcertificatekeyfile': 1,
366        'sslciphersuite': 1,
367        'sslcryptodevice': 1,
368        'sslengine': 1,
369        'sslhonorciperorder': 1,
370        'sslmutex': 1,
371        'ssloptions': 1,
372        'sslpassphrasedialog': 1,
373        'sslprotocol': 1,
374        'sslproxycacertificatefile': 1,
375        'sslproxycacertificatepath': 1,
376        'sslproxycarevocationfile': 1,
377        'sslproxycarevocationpath': 1,
378        'sslproxyciphersuite': 1,
379        'sslproxyengine': 1,
380        'sslproxymachinecertificatefile': 1,
381        'sslproxymachinecertificatepath': 1,
382        'sslproxyprotocol': 1,
383        'sslproxyverify': 1,
384        'sslproxyverifydepth': 1,
385        'sslrandomseed': 1,
386        'sslrequire': 1,
387        'sslrequiressl': 1,
388        'sslsessioncache': 1,
389        'sslsessioncachetimeout': 1,
390        'sslusername': 1,
391        'sslverifyclient': 1,
392        'sslverifydepth': 1,
393        'startservers': 1,
394        'startthreads': 1,
395        'substitute': 1,
396        'suexecusergroup': 1,
397        'threadlimit': 1,
398        'threadsperchild': 1,
399        'threadstacksize': 1,
400        'timeout': 1,
401        'traceenable': 1,
402        'transferlog': 1,
403        'typesconfig': 1,
404        'unsetenv': 1,
405        'usecanonicalname': 1,
406        'usecanonicalphysicalport': 1,
407        'user': 1,
408        'userdir': 1,
409        'virtualdocumentroot': 1,
410        'virtualdocumentrootip': 1,
411        'virtualscriptalias': 1,
412        'virtualscriptaliasip': 1,
413        'win32disableacceptex': 1,
414        'xbithack': 1
415      },
416      'literal': {'on': 1, 'off': 1}
417    }
418  },
419  modes: [
420    hljs.HASH_COMMENT_MODE,
421    {
422      /* TODO: check tag content: Location, Files, VirtualHost, ... */
423      className: 'tag',
424      begin: '</?', end: '>'
425    },
426    {
427      className: 'sqbracket',
428      begin: '\\s\\[', end: '\\]$'
429    },
430    {
431      className: 'cbracket',
432      begin: '[\\$%]\\{', end: '\\}',
433      contains: ['cbracket', 'number']
434    },
435    {
436      className: 'number',
437      begin: '[\\$%]\\d+', end: '^'
438    },
439    hljs.QUOTE_STRING_MODE,
440    hljs.BACKSLASH_ESCAPE
441  ]
442};