feat wire server-side highlighting into blob file view

Replace the client-side highlight.js approach with server-rendered syntax highlighting in the /file/<blob> view: - Syntax.detect identifies the language from filename/shebang/modeline - Highlight.highlight tokenizes the source with TextMate grammars - Ui.highlighted_code_listing renders the pre-highlighted spans The blob view no longer requires JavaScript for syntax colouring.

Commit
6bbd8f6f8751096acb2e89e41b40af0fcd119ecc
Author
Marius Peter <dev@marius-peter.com>
Author date
Committer
Marius Peter <dev@marius-peter.com>
Committer date
lib/views/repo.ml
index 2b9083a7..3b87d69a 100644..100644
@@ -333,9 +333,8 @@
333 333 render_page context ~active ~toolbar
334 334 [
335 335 raw_link;
336 Removed: Ui.code_listing ~id:"blob"
337 Removed: ?class_:(Option.map (Printf.sprintf "language-%s") language)
338 Removed: blob.content;
336 Added: (let lines = Highlight.highlight ~lang:language blob.content in
337 Added: Ui.highlighted_code_listing ~id:"blob" lines);
339 338 ]
340 339
341 340 let commit context (commit : Resolvers.Commit.t) diff =