From 5b60db394cbbbb031b615ff3278ec43cbe3fe88c Mon Sep 17 00:00:00 2001 From: James Moger <james.moger@gitblit.com> Date: Thu, 05 May 2011 18:40:39 -0400 Subject: [PATCH] Automatically generate a self-signed certificate with BouncyCastle. --- src/com/gitblit/utils/GitBlitDiffFormatter.java | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/com/gitblit/utils/GitBlitDiffFormatter.java b/src/com/gitblit/utils/GitBlitDiffFormatter.java index 54cb6c2..37ee8f5 100644 --- a/src/com/gitblit/utils/GitBlitDiffFormatter.java +++ b/src/com/gitblit/utils/GitBlitDiffFormatter.java @@ -97,6 +97,10 @@ // skip index lines } else if (line.startsWith("new file")) { // skip new file lines + } else if (line.startsWith("\\ No newline")) { + // skip no new line + } else if (line.startsWith("---") || line.startsWith("+++")) { + // skip --- +++ lines } else if (line.startsWith("diff")) { if (line.indexOf(oldnull) > -1) { // a is null, use b @@ -115,10 +119,8 @@ sb.append("<div class=\"diff\">"); sb.append("<table><tbody>"); inFile = true; - } else if (line.startsWith("---") || line.startsWith("+++")) { - // skip --- +++ lines } else { - sb.append(line).append('\n'); + sb.append(line); } } sb.append("</table></div>"); -- Gitblit v1.9.1