Fossil SCM

File listing has extra space before file name

Fixed

28d861eb5799a60… · opened 16 years, 6 months ago

Type
Code_Defect
Priority
Severity
Cosmetic
Resolution
Fixed
Subsystem
Created
Oct. 11, 2009 8:43 p.m.

File listing ("Files in the top-level directory") has an extra space before file name, which looks like underscore when used as link. I propose removing the space (see this picture: [http://i33.tinypic.com/9tfgo7.png]).


--- src/browse.c
+++ src/browse.c
@@ -222,19 +222,19 @@
     }
     i++;
     zFName = db_column_text(&q, 0);
     if( zFName[0]=='/' ){
       zFName++;
-      @ <li><a href="%s(zSubdirLink)%T(zFName)">
-      @     %h(zFName)/</a></li>
+      @ <li>
+      @     <a href="%s(zSubdirLink)%T(zFName)">%h(zFName)/</a></li>
     }else if( zCI ){
       const char *zUuid = db_column_text(&q, 1);
       @ <li><a href="%s(g.zBaseURL)/artifact?name=%s(zUuid)">%h(zFName)</a>
     }else{
-      @ <li><a href="%s(g.zBaseURL)/finfo?name=%T(zPrefix)%T(zFName)">
-      @     %h(zFName)</a></li>
+      @ <li>
+      @     <a href="%s(g.zBaseURL)/finfo?name=%T(zPrefix)%T(zFName)">%h(zFName)</a></li>
     }
   }
   db_finalize(&q);
   @ </td></tr></table>
   style_footer();
 }


anonymous claiming to be Dmitry Chestnykh added on 2009-10-21 18:02:17:
Here's a better version, since the first one goes over 79 chars per line:


--- src/browse.c
+++ src/browse.c
@@ -223,18 +223,19 @@
     i++;
     zFName = db_column_text(&q, 0);
     if( zFName[0]=='/' ){
       zFName++;
       @ <li><a href="%s(zSubdirLink)%T(zFName)">
-      @     %h(zFName)/</a></li>
+      @ %h(zFName)/</a></li>
     }else if( zCI ){
       const char *zUuid = db_column_text(&q, 1);
       @ <li><a href="%s(g.zBaseURL)/artifact?name=%s(zUuid)">%h(zFName)</a>
     }else{
-      @ <li><a href="%s(g.zBaseURL)/finfo?name=%T(zPrefix)%T(zFName)">
-      @     %h(zFName)</a></li>
+      @ <li>
+      @ <a href="%s(g.zBaseURL)/finfo?name=%T(zPrefix)%T(zFName)">
+      @ %h(zFName)</a></li>
     }
   }
   db_finalize(&q);
   @ </td></tr></table>
   style_footer();
 }


drh added on 2009-10-31 13:24:04:
Check-in [4165033b4030ce9dc3dd4a71ed0acc870a32fb13]

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button