Skip to content

Commit

Permalink
fix: repo widget file paths on Windows computers (#1029)
Browse files Browse the repository at this point in the history
  • Loading branch information
SZRabinowitz committed Feb 21, 2024
1 parent 7e1f9d5 commit 129b573
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions layouts/partials/docs/repo.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ <h2 class="card-title fs-4 my-2 text-surface d-none d-lg-block">{{ i18n "repo_ti
<ul class="list-unstyled">
{{- if $.File -}}
{{- $filePath := printf "%s/%s%s" $branch $subPath (strings.TrimPrefix $root $.File.Filename) -}}
{{- $filePath = replace $filePath "\\" "/" -}}
<li class="mb-1">
<a href="{{ printf $sourceUrlFormat $url $filePath }}" target="_blank" rel="noopener noreferrer">
<i class="fas fa-fw fa-file-archive text-success"></i> {{ i18n "repo_action_view" }}
Expand Down

0 comments on commit 129b573

Please sign in to comment.