UNPKG

544 BJavaScriptView Raw
1Prism.languages.diff = {
2 'coord': [
3 // Match all kinds of coord lines (prefixed by "+++", "---" or "***").
4 /^(?:\*{3}|-{3}|\+{3}).*$/m,
5 // Match "@@ ... @@" coord lines in unified diff.
6 /^@@.*@@$/m,
7 // Match coord lines in normal diff (starts with a number).
8 /^\d+.*$/m
9 ],
10
11 // Match inserted and deleted lines. Support both +/- and >/< styles.
12 'deleted': /^[-<].*$/m,
13 'inserted': /^[+>].*$/m,
14
15 // Match "different" lines (prefixed with "!") in context diff.
16 'diff': {
17 'pattern': /^!(?!!).+$/m,
18 'alias': 'important'
19 }
20};