This repository has been archived on 2024-07-27. You can view files and clone it, but cannot push or open issues or pull requests.
keksAccountGUI/node_modulesOLD/highlight.js/lib/languages/accesslog.js
2019-08-11 20:48:02 +02:00

37 lines
No EOL
827 B
JavaScript

module.exports = function(hljs) {
return {
contains: [
// IP
{
className: 'number',
begin: '\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b'
},
// Other numbers
{
className: 'number',
begin: '\\b\\d+\\b',
relevance: 0
},
// Requests
{
className: 'string',
begin: '"(GET|POST|HEAD|PUT|DELETE|CONNECT|OPTIONS|PATCH|TRACE)', end: '"',
keywords: 'GET POST HEAD PUT DELETE CONNECT OPTIONS PATCH TRACE',
illegal: '\\n',
relevance: 10
},
// Dates
{
className: 'string',
begin: /\[/, end: /\]/,
illegal: '\\n'
},
// Strings
{
className: 'string',
begin: '"', end: '"',
illegal: '\\n'
}
]
};
};