/usr/share/yelp-xsl/js/jquery.syntax.brush.diff.js is in yelp-xsl 3.10.1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | // brush: "diff" aliases: ["patch"]
// This file is part of the "jQuery.Syntax" project, and is distributed under the MIT License.
// Copyright (c) 2011 Samuel G. D. Williams. <http://www.oriontransfer.co.nz>
// See <jquery.syntax.js> for licensing details.
Syntax.register('diff', function(brush) {
brush.push({pattern: /^\+\+\+.*$/gm, klass: 'add'});
brush.push({pattern: /^\-\-\-.*$/gm, klass: 'del'});
brush.push({pattern: /^@@.*@@/gm, klass: 'offset'});
brush.push({pattern: /^\+[^\+]{1}.*$/gm, klass: 'insert'});
brush.push({pattern: /^\-[^\-]{1}.*$/gm, klass: 'remove'});
brush.postprocess = function (options, html, container) {
$('.insert', html).closest('.source').addClass('insert-line');
$('.remove', html).closest('.source').addClass('remove-line');
$('.offset', html).closest('.source').addClass('offset-line');
return html;
};
});
|