mirror of
https://github.com/correl/melpa.git
synced 2024-12-27 20:06:22 +00:00
65 lines
1.3 KiB
JavaScript
65 lines
1.3 KiB
JavaScript
|
/*
|
||
|
Language: Diff
|
||
|
Description: Unified and context diff
|
||
|
Author: Vasily Polovnyov <vast@whiteants.net>
|
||
|
*/
|
||
|
|
||
|
hljs.LANGUAGES.diff = {
|
||
|
case_insensitive: true,
|
||
|
defaultMode: {
|
||
|
contains: [
|
||
|
{
|
||
|
className: 'chunk',
|
||
|
begin: '^\\@\\@ +\\-\\d+,\\d+ +\\+\\d+,\\d+ +\\@\\@$',
|
||
|
relevance: 10
|
||
|
},
|
||
|
{
|
||
|
className: 'chunk',
|
||
|
begin: '^\\*\\*\\* +\\d+,\\d+ +\\*\\*\\*\\*$',
|
||
|
relevance: 10
|
||
|
},
|
||
|
{
|
||
|
className: 'chunk',
|
||
|
begin: '^\\-\\-\\- +\\d+,\\d+ +\\-\\-\\-\\-$',
|
||
|
relevance: 10
|
||
|
},
|
||
|
{
|
||
|
className: 'header',
|
||
|
begin: 'Index: ', end: '$'
|
||
|
},
|
||
|
{
|
||
|
className: 'header',
|
||
|
begin: '=====', end: '=====$'
|
||
|
},
|
||
|
{
|
||
|
className: 'header',
|
||
|
begin: '^\\-\\-\\-', end: '$'
|
||
|
},
|
||
|
{
|
||
|
className: 'header',
|
||
|
begin: '^\\*{3} ', end: '$'
|
||
|
},
|
||
|
{
|
||
|
className: 'header',
|
||
|
begin: '^\\+\\+\\+', end: '$'
|
||
|
},
|
||
|
{
|
||
|
className: 'header',
|
||
|
begin: '\\*{5}', end: '\\*{5}$'
|
||
|
},
|
||
|
{
|
||
|
className: 'addition',
|
||
|
begin: '^\\+', end: '$'
|
||
|
},
|
||
|
{
|
||
|
className: 'deletion',
|
||
|
begin: '^\\-', end: '$'
|
||
|
},
|
||
|
{
|
||
|
className: 'change',
|
||
|
begin: '^\\!', end: '$'
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
};
|