mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-08 06:25:51 +01:00
Fix diff class attribute in split mode
This commit is contained in:
@@ -149,7 +149,7 @@ $.extend(JsDiffRender.prototype,{
|
|||||||
$('<tr>').append(
|
$('<tr>').append(
|
||||||
lineNum('old',o.base, o.change),
|
lineNum('old',o.base, o.change),
|
||||||
$('<td class="body">').html(o.base ? baseTextDom(o.base): "").addClass(o.change),
|
$('<td class="body">').html(o.base ? baseTextDom(o.base): "").addClass(o.change),
|
||||||
lineNum('old',o.head, o.change),
|
lineNum('new',o.head, o.change),
|
||||||
$('<td class="body">').html(o.head ? headTextDom(o.head): "").addClass(o.change)
|
$('<td class="body">').html(o.head ? headTextDom(o.head): "").addClass(o.change)
|
||||||
).appendTo(tbody);
|
).appendTo(tbody);
|
||||||
break;
|
break;
|
||||||
@@ -158,7 +158,7 @@ $.extend(JsDiffRender.prototype,{
|
|||||||
$('<tr>').append(
|
$('<tr>').append(
|
||||||
lineNum('old',o.base, 'delete'),
|
lineNum('old',o.base, 'delete'),
|
||||||
$('<td class="body">').append(ld.base).addClass('delete'),
|
$('<td class="body">').append(ld.base).addClass('delete'),
|
||||||
lineNum('old',o.head, 'insert'),
|
lineNum('new',o.head, 'insert'),
|
||||||
$('<td class="body">').append(ld.head).addClass('insert')
|
$('<td class="body">').append(ld.head).addClass('insert')
|
||||||
).appendTo(tbody);
|
).appendTo(tbody);
|
||||||
break;
|
break;
|
||||||
@@ -379,7 +379,7 @@ function string_score(string, word) {
|
|||||||
strLength = string.length,
|
strLength = string.length,
|
||||||
lWord = word.toUpperCase(),
|
lWord = word.toUpperCase(),
|
||||||
wordLength = word.length;
|
wordLength = word.length;
|
||||||
|
|
||||||
return calc(zero, 0, 0, 0, 0, []);
|
return calc(zero, 0, 0, 0, 0, []);
|
||||||
function calc(score, startAt, skip, runningScore, i, matchingPositions){
|
function calc(score, startAt, skip, runningScore, i, matchingPositions){
|
||||||
if( i < wordLength) {
|
if( i < wordLength) {
|
||||||
|
|||||||
Reference in New Issue
Block a user