From f664c627f96ce015e3e8d2be4fe09a9350fd4da8 Mon Sep 17 00:00:00 2001 From: Guilhem Fanton <8671905+gfanton@users.noreply.github.com> Date: Fri, 20 Dec 2024 15:38:34 +0100 Subject: [PATCH] fix(gnoweb): chroma gno.mod support (#3387) Chroma actually doesn't support `gno.mod` for highlighting; this PR simply falls back to the `txt` format. Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com> --- gno.land/pkg/gnoweb/handler.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/gno.land/pkg/gnoweb/handler.go b/gno.land/pkg/gnoweb/handler.go index b3a9fcd143c..bc87f057e26 100644 --- a/gno.land/pkg/gnoweb/handler.go +++ b/gno.land/pkg/gnoweb/handler.go @@ -331,8 +331,6 @@ func (h *WebHandler) highlightSource(fileName string, src []byte) ([]byte, error lexer = lexers.Get("go") case ".md": lexer = lexers.Get("markdown") - case ".mod": - lexer = lexers.Get("gomod") default: lexer = lexers.Get("txt") // file kind not supported, fallback on `.txt` }