diff options
author | Gabriel A. Giovanini <mail@gabrielgio.me> | 2025-02-08 22:26:39 +0100 |
---|---|---|
committer | Gabriel A. Giovanini <mail@gabrielgio.me> | 2025-02-08 22:26:39 +0100 |
commit | 154f68bfd9ab4660dc764dbed6190289082b5c94 (patch) | |
tree | 0eded5dc3e540ebb930b6b2cdc7ad898303783f2 /templates | |
parent | e251d0d2d40fa6cc583954be7ca00cf60f5d15e9 (diff) | |
download | cerrado-154f68bfd9ab4660dc764dbed6190289082b5c94.tar.gz cerrado-154f68bfd9ab4660dc764dbed6190289082b5c94.tar.bz2 cerrado-154f68bfd9ab4660dc764dbed6190289082b5c94.zip |
feat: Add syntax highlight to diff
Diffstat (limited to 'templates')
-rw-r--r-- | templates/gititemcommit.qtpl | 4 | ||||
-rw-r--r-- | templates/gititemcommit.qtpl.go | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/templates/gititemcommit.qtpl b/templates/gititemcommit.qtpl index d223315..ec67757 100644 --- a/templates/gititemcommit.qtpl +++ b/templates/gititemcommit.qtpl @@ -3,7 +3,7 @@ {% code type GitItemCommitPage struct { Commit *object.Commit - Diff string + Diff []byte } %} @@ -14,6 +14,6 @@ type GitItemCommitPage struct { {%= Commit(name, g.Commit, true) %} </div> <div class="code-view"> -<pre>{%s g.Diff %}</pre> +<pre>{%z= g.Diff %}</pre> </div> {% endfunc %} diff --git a/templates/gititemcommit.qtpl.go b/templates/gititemcommit.qtpl.go index 8048e58..7e458f3 100644 --- a/templates/gititemcommit.qtpl.go +++ b/templates/gititemcommit.qtpl.go @@ -23,7 +23,7 @@ var ( //line templates/gititemcommit.qtpl:4 type GitItemCommitPage struct { Commit *object.Commit - Diff string + Diff []byte } //line templates/gititemcommit.qtpl:10 @@ -73,7 +73,7 @@ func (g *GitItemCommitPage) StreamGitContent(qw422016 *qt422016.Writer, name, re <div class="code-view"> <pre>`) //line templates/gititemcommit.qtpl:17 - qw422016.E().S(g.Diff) + qw422016.N().Z(g.Diff) //line templates/gititemcommit.qtpl:17 qw422016.N().S(`</pre> </div> |