From 84d628c690357578a7a43e5485e9c4e01c5c9ea2 Mon Sep 17 00:00:00 2001 From: Eric Sunshine Date: Fri, 23 Jan 2015 17:14:24 -0500 Subject: [PATCH] views/blob: suppress double-slash in page title For blobs in subdirectories, the page title always includes a double slash between the final directory component and the filename (for example, "git >> repo >> branch >> doc//readme.txt"). This is unsightly. git-arr:blob() ensures that the directory passed to views/blob always has a trailing slash, so we can drop the slash inserted by views/blob between the directory and the filename. As a side-effect, this also changes the page title for blobs in the root directory. Instead of "git >> repo >> branch >> /readme.txt", the title becomes "git >> repo >> branch >> readme.txt", which is slightly more aesthetically pleasing. Signed-off-by: Eric Sunshine Signed-off-by: Alberto Bertogli --- views/blob.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/blob.html b/views/blob.html index c937b37..5e5b960 100644 --- a/views/blob.html +++ b/views/blob.html @@ -11,7 +11,7 @@ % relroot = reltree + '../' * (len(branch.split('/')) - 1) git » {{repo.name}} » - {{branch}} » {{dirname.unicode}}/{{fname.unicode}} + {{branch}} » {{dirname.unicode}}{{fname.unicode}}