From 9c0a011974f1392110164052c3481509641d2f58 Mon Sep 17 00:00:00 2001 From: Joe Mou Date: Wed, 28 Jan 2026 14:40:22 -0500 Subject: Syntax highlighting Sometimes GitHub returns colorizedLines and sometimes it returns a terser stylingDirectives, which needs to be applied to rawLines. --- views/blob.eta | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'views/blob.eta') diff --git a/views/blob.eta b/views/blob.eta index 346afab..4972209 100644 --- a/views/blob.eta +++ b/views/blob.eta @@ -14,6 +14,8 @@ <% if (it.htmlContent) { %>
<%~ it.htmlContent %>
+<% } else if (it.htmlLines) { %> +
<%~ it.htmlLines.join("\n") %>
<% } else { %> -
<%= it.rawLines.join("\n") %>
+
<%= it.textLines.join("\n") %>
<% } %> -- cgit v1.3.1