diff options
context:
space:
mode:
authorBryce Kwon <bryce@brycekwon.com>
committerBryce Kwon <bryce@brycekwon.com>
commit
parent
tree
download
Add built-in syntax highlighting
Highlighting previously required a source filter shelling out to something like Pygments. A configured source filter still takes precedence, every character is preserved so the line gutter stays aligned, and large files are skipped.
Diffstat (limited to '')
-rw-r--r--assets/cgit.css7
1 file changed, 7 insertions, 0 deletions
diff --git a/assets/cgit.css b/assets/cgit.css
index 4504702..96192e4 100644
--- a/assets/cgit.css
+++ b/assets/cgit.css
@@ -601,6 +601,13 @@ div#cgit table.blob td.linenumbers a:target:before {
content: "\2BA9";
}
+/* Tokens produced by the client-side highlighter in cgit.js. */
+div#cgit .hl-comment { color: light-dark(#6a737d, #8b949e); font-style: italic; }
+div#cgit .hl-keyword { color: light-dark(#cf222e, #ff7b72); }
+div#cgit .hl-string { color: light-dark(#0a7d24, #7ee787); }
+div#cgit .hl-number { color: light-dark(#0550ae, #79c0ff); }
+
+
/* ---- Blame ------------------------------------------------------------ */
div#cgit table.blame {