templates/commit: Replace <p> in <pre> with <span> <p> is a block-level element, and is invalid in <pre>.
Runxi Yu me@runxiyu.org
Sat, 15 Feb 2025 18:48:13 +0800
2 files changed, 2 insertions(+), 3 deletions(-)
M config.yaml → config.yaml
@@ -1,5 +1,5 @@ repo: - scanPath: /var/www/git + scanPath: /tmp/git readme: - readme - README
M templates/commit.html → templates/commit.html
@@ -78,9 +78,8 @@ {{- end -}} {{ if .IsBinary }} <p>Not showing binary file.</p> {{ else }} - <pre> + <pre><span style="display: block">{{- .Header -}}</span> {{- range .TextFragments -}} - <p>{{- .Header -}}</p> {{- range .Lines -}} {{- if eq .Op.String "+" -}} <span class="diff-add">{{ .String }}</span>