git3html

git clone https://orangeshoelaces.net/git/git3html.git

143d754e24d07a293537a4c794fd3c2ef4ac9090

Author: Vasilii Kolobkov on 01/15/2019

Committer: Vasilii Kolobkov on 01/15/2019

Fix hunk and diff headers

Stats

git3html | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

Patch

diff --git a/git3html b/git3html
index 22175c8..48b35e1 100755
--- a/git3html
+++ b/git3html
@@ -182,8 +182,9 @@ commit() (
 	printf '<pre><code>'
 	g diff-tree -p "$id" | tail -n +2 | escape | sed "\
 		$(for p in diff old new deleted copy rename similarity dissimilarity index; do
-			echo "/^$p/ { s,^,<span class=\"hunk-header\">,; s,$,</span>,; }"
+			echo "/^$p/ { s,^,<span class=\"diff-header\">,; s,$,</span>,; }"
 		done;)
+		/^@@/ { s,^,<span class=\"hunk-header\">,; s,$,</span>,; }
 		/^+/ { s,^,<span class=\"add\">,; s,$,</span>,; }
 		/^-/ { s,^,<span class=\"delete\">,; s,$,</span>,; }"
 	printf '</code></pre>\n'