Project

General

Profile

Actions

Defect #17809

closed

wrong syntax highlighting "---" header and "--" footer of git diff

Added by Tobias Fischer over 9 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
UI
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Affected version:

Description

Rendering of patches adds an additional "deletion" line for the following (standard) diff syntax:

Whereas the "deletion" of line 22 in the screenshot isn't part of the changeset at all:

From 9b1992fe9db52e1df90a6a963a686cd2cf20e706 Mon Sep 17 00:00:00 2001
From: Tobias Fischer
Date: Sat, 6 Sep 2014 12:22:02 +0200
Subject: [PATCH]  Additional view hook "body_top" 

In the same way as "view_layouts_base_body_bottom" exists...
---
 app/views/layouts/base.html.erb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/app/views/layouts/base.html.erb b/app/views/layouts/base.html.erb
index 99ad13f..45ef5bd 100644
--- a/app/views/layouts/base.html.erb
+++ b/app/views/layouts/base.html.erb
@@ -16,6 +16,7 @@
 <%= yield :header_tags -%>
 </head>
 <body class="<%=h body_css_classes %>">
+<%= call_hook :view_layouts_base_body_top %>
 <div id="wrapper">
 <div id="wrapper2">
 <div id="wrapper3">
-- 
1.8.5.2 (Apple Git-48)

And also this diff gets wrong syntax highlighting for the meta-lines "---" and "-- "

So I would expect the line 22 not to be rendered at all and an the syntax highlighting, there should be no highlighting for "---" and "-- "


Files

patch_screenshot.png (28 KB) patch_screenshot.png Tobias Fischer, 2014-09-06 12:31
3.4.png (33.3 KB) 3.4.png Toshi MARUYAMA, 2020-04-26 17:13
4.1.png (30 KB) 4.1.png Toshi MARUYAMA, 2020-04-26 17:13
Actions

Also available in: Atom PDF