From 72d1688df7dd5aee52dc642e821a999263dec0da Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 31 Oct 2026 13:22:13 -0700 Subject: Call string.match like the rest of the highlighter --- custom/extensions/syntax-highlight.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom/extensions/syntax-highlight.lua b/custom/extensions/syntax-highlight.lua index 8a1e7ab..6605d71 100644 --- a/custom/extensions/syntax-highlight.lua +++ b/custom/extensions/syntax-highlight.lua @@ -187,7 +187,7 @@ local function lexer_for(name, text) if type(scintillua.detect) == "function" then -- The first line goes along, so a script with no extension is still -- known by its shebang. - local ok, lang = pcall(scintillua.detect, name, text:match("^[^\n]*")) + local ok, lang = pcall(scintillua.detect, name, string.match(text, "^[^\n]*")) if ok and lang then local lexer = load_lexer_name(lang) if lexer then -- cgit