Ensure base path always starts and ends with /
The base path is an absolute path, so it should always start with /. Whenever it is used, it must also always be followed by at least one /, so baking that into the value makes sense. Finally, we can now deduplicate the / in case the base path is the root.
This commit is contained in:
parent
d5a41abaff
commit
6ed6ff1a36
4 changed files with 18 additions and 19 deletions
|
|
@ -11,7 +11,7 @@
|
|||
{% for ref in tracked_refs %}
|
||||
<dt>{{ ref.name }}</dt>
|
||||
<dd>
|
||||
<a href="{{ base.root }}/commit/{{ ref.hash }}">
|
||||
<a href="{{ base.root }}commit/{{ ref.hash }}">
|
||||
{% call util::commit_short(ref.short, ref.reachable) %}
|
||||
</a>
|
||||
</dd>
|
||||
|
|
@ -24,7 +24,7 @@
|
|||
{% for ref in untracked_refs %}
|
||||
<dt>{{ ref.name }}</dt>
|
||||
<dd>
|
||||
<a href="{{ base.root }}/commit/{{ ref.hash }}">
|
||||
<a href="{{ base.root }}commit/{{ ref.hash }}">
|
||||
{% call util::commit_short(ref.short, ref.reachable) %}
|
||||
</a>
|
||||
</dd>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue