From 06ad0f23f73dffb1a51e0438b0aad02e225430b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kim=20=22BKC=22=20Carlb=C3=A4cker?= Date: Sat, 26 Dec 2015 14:32:39 +0100 Subject: [PATCH] Now it's actually working ;) --- templates/repo/diff_box_unified.tmpl | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/templates/repo/diff_box_unified.tmpl b/templates/repo/diff_box_unified.tmpl index 386f530df..4e7540d14 100644 --- a/templates/repo/diff_box_unified.tmpl +++ b/templates/repo/diff_box_unified.tmpl @@ -73,11 +73,10 @@ (function() { $('.add-code').each(function() { var prev = $(this).prev(); - if(prev.is('.del-code')) { - while(prev.prev().is('.del-code') && prev.prev().text().trim() !== '') { + if(prev.is('.del-code') && prev.children().eq(3).text().trim() === '') { + while(prev.prev().is('.del-code') && prev.prev().children().eq(3).text().trim() === '') { prev = prev.prev(); } - console.log("done"); prev.children().eq(3).html($(this).children().eq(3).html()); prev.children().eq(2).html($(this).children().eq(2).html()); prev.children().eq(2).attr('style', 'background-color: #eaffea !important');