39 lines
906 B
JavaScript
39 lines
906 B
JavaScript
|
module.exports = function(hljs) {
|
||
|
return {
|
||
|
aliases: ['patch'],
|
||
|
contains: [
|
||
|
{
|
||
|
className: 'chunk',
|
||
|
relevance: 10,
|
||
|
variants: [
|
||
|
{begin: /^@@ +\-\d+,\d+ +\+\d+,\d+ +@@$/},
|
||
|
{begin: /^\*\*\* +\d+,\d+ +\*\*\*\*$/},
|
||
|
{begin: /^\-\-\- +\d+,\d+ +\-\-\-\-$/}
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
className: 'header',
|
||
|
variants: [
|
||
|
{begin: /Index: /, end: /$/},
|
||
|
{begin: /=====/, end: /=====$/},
|
||
|
{begin: /^\-\-\-/, end: /$/},
|
||
|
{begin: /^\*{3} /, end: /$/},
|
||
|
{begin: /^\+\+\+/, end: /$/},
|
||
|
{begin: /\*{5}/, end: /\*{5}$/}
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
className: 'addition',
|
||
|
begin: '^\\+', end: '$'
|
||
|
},
|
||
|
{
|
||
|
className: 'deletion',
|
||
|
begin: '^\\-', end: '$'
|
||
|
},
|
||
|
{
|
||
|
className: 'change',
|
||
|
begin: '^\\!', end: '$'
|
||
|
}
|
||
|
]
|
||
|
};
|
||
|
};
|