From a4d2498b7f94012cfdf481fcf151f8cfd7537a42 Mon Sep 17 00:00:00 2001 From: James Moger <james.moger@gitblit.com> Date: Mon, 23 May 2011 16:46:09 -0400 Subject: [PATCH] User list. Revised home page. Updated Jetty. Secure cookies. Docs. --- 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