From df665ddc3842dbe4677c1cbbafe55b80670f3c1c Mon Sep 17 00:00:00 2001 From: Guldoman Date: Mon, 25 Oct 2021 14:06:07 +0200 Subject: [PATCH] Use `header` to get syntax only when provided --- data/core/syntax.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/core/syntax.lua b/data/core/syntax.lua index a763ac78..de8ec9d0 100644 --- a/data/core/syntax.lua +++ b/data/core/syntax.lua @@ -22,7 +22,7 @@ end function syntax.get(filename, header) return find(filename, "files") - or find(header, "headers") + or (header and find(header, "headers")) or plain_text_syntax end