]>
luflow.net public git repositories - flow-web.git/blob - static/highlight/es/languages/accesslog.js
1 /*! `accesslog` grammar compiled for Highlight.js 11.11.1 */
2 var hljsGrammar
= (function () {
6 Language: Apache Access Log
7 Author: Oleg Efimov <efimovov@gmail.com>
8 Description: Apache/Nginx Access Logs
9 Website: https://httpd.apache.org/docs/2.4/logs.html#accesslog
14 /** @type LanguageFn */
15 function accesslog(hljs
) {
16 const regex
= hljs
.regex
;
17 // https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods
30 name: 'Apache Access Log',
35 begin: /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}(:\d{1,5})?\b/,
47 begin: regex
.concat(/"/, regex.either(...HTTP_VERBS)),
54 begin: /HTTP\/[12]\.\d'/,
62 // dates must have a certain length, this prevents matching
63 // simple array accesses a[123] and [] and other common patterns
64 // found in other languages
65 begin: /\[\d[^\]\n]{8,}\]/,
76 // User agent / relevance boost
79 begin: /"Mozilla\/\d\.\d \(/,
100 export default hljsGrammar
;