From 2988da14bed5f628cf4cd90eca0eec3c11f0c061 Mon Sep 17 00:00:00 2001 From: Melody Horn Date: Thu, 22 Apr 2021 14:04:13 -0600 Subject: add syntax highlighting to files --- templates/repo_file.html | 5 ++--- templates/repo_folder.html | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'templates') diff --git a/templates/repo_file.html b/templates/repo_file.html index e01d02c..796846e 100644 --- a/templates/repo_file.html +++ b/templates/repo_file.html @@ -9,9 +9,8 @@

gityeet

+

{{ repo_path }}

{{ rel_path }}

-
-{{ blob.content()|from_utf8_lossy }}
-
+{{ blob.content()|from_utf8_lossy|highlight(rel_path)|safe }} diff --git a/templates/repo_folder.html b/templates/repo_folder.html index 6f6b3a9..81f455f 100644 --- a/templates/repo_folder.html +++ b/templates/repo_folder.html @@ -9,6 +9,7 @@

gityeet

+

{{ repo_path }}

{{ rel_path }}

{%- macro effective_name(entry) -%} {{- entry.name().unwrap() -}} -- cgit v1.2.3