biofriction-wp-theme/node_modules/highlight.js/lib/languages/apache.js

45 lines
1.3 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

module.exports = function(hljs) {
var NUMBER = {className: 'number', begin: '[\\$%]\\d+'};
return {
aliases: ['apacheconf'],
case_insensitive: true,
contains: [
hljs.HASH_COMMENT_MODE,
{className: 'tag', begin: '</?', end: '>'},
{
className: 'keyword',
begin: /\w+/,
relevance: 0,
// keywords arent needed for highlighting per se, they only boost relevance
// for a very generally defined mode (starts with a word, ends with line-end
keywords: {
common:
'order deny allow setenv rewriterule rewriteengine rewritecond documentroot ' +
'sethandler errordocument loadmodule options header listen serverroot ' +
'servername'
},
starts: {
end: /$/,
relevance: 0,
keywords: {
literal: 'on off all'
},
contains: [
{
className: 'sqbracket',
begin: '\\s\\[', end: '\\]$'
},
{
className: 'cbracket',
begin: '[\\$%]\\{', end: '\\}',
contains: ['self', NUMBER]
},
NUMBER,
hljs.QUOTE_STRING_MODE
]
}
}
],
illegal: /\S/
};
};