vole
Clone
Read only, no credentials:
https://rodent.software/git/vole.git
Write over SSH with a registered key:
git clone ssh://git@0.0.0.0:2222/vole.git
A free and open-source forge that lives in your Git repo.
Highlight syntax in diff views
e7982ac5137be6e891616cdcdedc035f9019f99b · Keenan Nemetz · 12d ago · parent a76b2f38
Highlight syntax in diff views The diff parser now names each file's Prism language from the new path (or the old path for a deletion), and the shared diff template carries that language plus the side of every line. app.js queues a diff once per side, so an old-side string or comment cannot colour new-side lines, and the token palette now covers diff cells as well as blobs. The commit, compare, and change-request Files views all use the same template, so they gain highlighting together.
server/web/templates/diff.html +2−2
| @@ -5,7 +5,7 @@ | |||
| 5 | 5 | <div class="diffsum muted">{{len .Files}} file(s) changed{{if .Added}} · <span class="adds">+{{.Added}}</span>{{end}}{{if .Removed}} · <span class="dels">−{{.Removed}}</span>{{end}}{{if .Truncated}} · showing the first 512 KiB{{end}}</div> | |
| 6 | 6 | {{range .Files}} | |
| 7 | 7 | {{$file := .}} | |
| 8 | <section class="diff"> | ||
| 8 | <section class="diff"{{if .Language}} data-highlight="{{.Language}}"{{end}}> | ||
| 9 | 9 | <h3><span class="path">{{if and .OldPath (ne .OldPath .NewPath)}}{{.OldPath}} → {{end}}{{.Label}}</span>{{if .Binary}} <span class="label">binary</span>{{end}}</h3> | |
| 10 | 10 | {{if .Binary}} | |
| 11 | 11 | <p class="binary">Binary file: no line diff to show. Use <code>git show</code> to inspect it.</p> | |
| @@ -25,7 +25,7 @@ | |||
| 25 | 25 | </td> | |
| 26 | 26 | <td class="ln">{{if .OldNo}}{{.OldNo}}{{end}}</td> | |
| 27 | 27 | <td class="ln">{{if .NewNo}}{{.NewNo}}{{end}}</td> | |
| 28 | <td class="code">{{.Text}}</td> | ||
| 28 | <td class="code" data-highlight-side="{{$side}}">{{.Text}}</td> | ||
| 29 | 29 | </tr> | |
| 30 | 30 | {{if .Comments}} | |
| 31 | 31 | <tr class="note"><td colspan="4"> | |