mirror of
https://github.com/discourse/discourse.git
synced 2024-12-12 23:53:47 +08:00
9 lines
615 B
JavaScript
9 lines
615 B
JavaScript
/*! `diff` grammar compiled for Highlight.js 11.6.0 */
|
|
(()=>{var e=(()=>{"use strict";return e=>{const a=e.regex;return{name:"Diff",
|
|
aliases:["patch"],contains:[{className:"meta",relevance:10,
|
|
match:a.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)
|
|
},{className:"comment",variants:[{
|
|
begin:a.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),
|
|
end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{
|
|
className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,
|
|
end:/$/}]}}})();hljs.registerLanguage("diff",e)})(); |