Mercurial
comparison third_party/highlight/languages/diff.min.js @ 173:827c6ac504cd hg-web
Merged in default here.
| author | MrJuneJune <me@mrjunejune.com> |
|---|---|
| date | Mon, 19 Jan 2026 18:59:10 -0800 |
| parents | 2db6253f355d |
| children |
comparison
equal
deleted
inserted
replaced
| 151:c033667da5f9 | 173:827c6ac504cd |
|---|---|
| 1 /*! `diff` grammar compiled for Highlight.js 11.11.1 */ | |
| 2 (()=>{var e=(()=>{"use strict";return e=>{const a=e.regex;return{name:"Diff", | |
| 3 aliases:["patch"],contains:[{className:"meta",relevance:10, | |
| 4 match:a.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/) | |
| 5 },{className:"comment",variants:[{ | |
| 6 begin:a.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/), | |
| 7 end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{ | |
| 8 className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/, | |
| 9 end:/$/}]}}})();hljs.registerLanguage("diff",e)})(); |