From 0466c9dbcbe5a97a2b44d49afd4e497b1a8994f7 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 31 Oct 2026 14:13:40 -0700 Subject: Say the highlighter needs Scintillua's detect() --- README.txt | 2 +- custom/extensions/syntax-highlight.lua | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.txt b/README.txt index 65928c6..e545d49 100644 --- a/README.txt +++ b/README.txt @@ -133,7 +133,7 @@ and each script's header lists the exact install commands for its own. luaposix. * The email filters, email-gravatar.lua and email-libravatar.lua, need luaossl. * The syntax highlighter, syntax-highlight.lua, needs lpeg and a Scintillua - lexer set. + recent enough to have detect(). * The about-page renderer, about-render.lua, needs lpeg for markdown and man pages. Plain text needs only Lua. * link-commits.lua and link-trailers.lua need nothing beyond Lua itself. diff --git a/custom/extensions/syntax-highlight.lua b/custom/extensions/syntax-highlight.lua index 3a4fa9b..e0000ec 100644 --- a/custom/extensions/syntax-highlight.lua +++ b/custom/extensions/syntax-highlight.lua @@ -28,7 +28,8 @@ local scintillua_env = "CGIT_SCINTILLUA_PATH" -- directory next to cgitrc is enough for it to be found. The lexers come -- from https://orbitalquark.github.io/scintillua/ and need lpeg, built for -- the Lua cgit is linked against. Forgetting that is the usual reason --- nothing is coloured. +-- nothing is coloured. A file is coloured only when Scintillua's detect() +-- names its lexer, so an older Scintillua without detect() colours nothing. -- -- # Debian and Ubuntu -- sudo apt install lua-lpeg -- cgit