34 lines
843 B
JavaScript
34 lines
843 B
JavaScript
module.exports = function(hljs) {
|
|
return {
|
|
aliases: ['https'],
|
|
illegal: '\\S',
|
|
contains: [
|
|
{
|
|
className: 'status',
|
|
begin: '^HTTP/[0-9\\.]+', end: '$',
|
|
contains: [{className: 'number', begin: '\\b\\d{3}\\b'}]
|
|
},
|
|
{
|
|
className: 'request',
|
|
begin: '^[A-Z]+ (.*?) HTTP/[0-9\\.]+$', returnBegin: true, end: '$',
|
|
contains: [
|
|
{
|
|
className: 'string',
|
|
begin: ' ', end: ' ',
|
|
excludeBegin: true, excludeEnd: true
|
|
}
|
|
]
|
|
},
|
|
{
|
|
className: 'attribute',
|
|
begin: '^\\w', end: ': ', excludeEnd: true,
|
|
illegal: '\\n|\\s|=',
|
|
starts: {className: 'string', end: '$'}
|
|
},
|
|
{
|
|
begin: '\\n\\n',
|
|
starts: {subLanguage: [], endsWithParent: true}
|
|
}
|
|
]
|
|
};
|
|
}; |