mirror of
https://github.com/mindoc-org/mindoc.git
synced 2025-05-06 14:47:56 +08:00
51 lines
1006 B
Go
51 lines
1006 B
Go
![]() |
/*
|
||
|
Language: Makefile
|
||
|
Author: Ivan Sagalaev <maniac@softwaremaniacs.org>
|
||
|
Category: common
|
||
|
*/
|
||
|
|
||
|
function(hljs) {
|
||
|
var VARIABLE = {
|
||
|
className: 'variable',
|
||
|
begin: /\$\(/, end: /\)/,
|
||
|
contains: [hljs.BACKSLASH_ESCAPE]
|
||
|
};
|
||
|
return {
|
||
|
aliases: ['mk', 'mak'],
|
||
|
contains: [
|
||
|
hljs.HASH_COMMENT_MODE,
|
||
|
{
|
||
|
begin: /^\w+\s*\W*=/, returnBegin: true,
|
||
|
relevance: 0,
|
||
|
starts: {
|
||
|
end: /\s*\W*=/, excludeEnd: true,
|
||
|
starts: {
|
||
|
end: /$/,
|
||
|
relevance: 0,
|
||
|
contains: [
|
||
|
VARIABLE
|
||
|
]
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
className: 'section',
|
||
|
begin: /^[\w]+:\s*$/
|
||
|
},
|
||
|
{
|
||
|
className: 'meta',
|
||
|
begin: /^\.PHONY:/, end: /$/,
|
||
|
keywords: {'meta-keyword': '.PHONY'}, lexemes: /[\.\w]+/
|
||
|
},
|
||
|
{
|
||
|
begin: /^\t+/, end: /$/,
|
||
|
relevance: 0,
|
||
|
contains: [
|
||
|
hljs.QUOTE_STRING_MODE,
|
||
|
VARIABLE
|
||
|
]
|
||
|
}
|
||
|
]
|
||
|
};
|
||
|
}
|