aboutsummaryrefslogtreecommitdiff
path: root/views/blob.eta
diff options
context:
space:
mode:
authorJoe Mou <dev@mou.fo>2026-01-28 14:40:22 -0500
committerJoe Mou <dev@mou.fo>2026-01-28 15:23:40 -0500
commit9c0a011974f1392110164052c3481509641d2f58 (patch)
tree704fbbbc85afe7017d4f8063a74e95e3c56022f3 /views/blob.eta
parentdd8d686c9eb9a68eb057aaf86206bc930e22d09a (diff)
Syntax highlighting
Sometimes GitHub returns colorizedLines and sometimes it returns a terser stylingDirectives, which needs to be applied to rawLines.
Diffstat (limited to 'views/blob.eta')
-rw-r--r--views/blob.eta4
1 files changed, 3 insertions, 1 deletions
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) { %>
<div class="box"><%~ it.htmlContent %></div>
+<% } else if (it.htmlLines) { %>
+ <pre class="box"><code><%~ it.htmlLines.join("\n") %></code></pre>
<% } else { %>
- <pre class="box"><code><%= it.rawLines.join("\n") %></code></pre>
+ <pre class="box"><code><%= it.textLines.join("\n") %></code></pre>
<% } %>